Changeset 14272


Ignore:
Timestamp:
10 Nov 2016, 17:02:15 (8 years ago)
Author:
Henrik Bettermann
Message:

Add A3LandscapePDFCreator for raw score sheets.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/browser/pdf.py

    r10566 r14272  
    2121
    2222import os
     23import grok
     24from reportlab.lib.pagesizes import A4, A3, landscape, portrait
    2325from waeup.kofa.browser.pdf import PDFCreator, LandscapePDFCreator
    2426
     
    4850    logo_pos = [750, 465, 60]
    4951
     52class A3LandscapePDFCreator(LandscapePDFCreator):
     53    """A utility to help with generating PDF docs in
     54    A3 landscape format.
     55    """
     56
     57    grok.name('A3landscape')
     58
     59    header_logo_path = os.path.join(
     60        os.path.dirname(__file__), 'static', 'pdf_logo.jpg')
     61    watermark_path = os.path.join(
     62        os.path.dirname(__file__), 'static', 'pdf_watermark.jpg')
     63
     64    watermark_pos = [360, 150]
     65    logo_pos = [1100, 700, 60]
     66    pagesize = landscape(A3)
     67
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/raw_score_report.py

    r14267 r14272  
    217217
    218218    def create_pdf(self):
    219         creator = getUtility(IPDFCreator, name='landscape')
     219        creator = getUtility(IPDFCreator, name='A3landscape')
    220220        table_data = dict()
    221221        for level in self.past_levels:
Note: See TracChangeset for help on using the changeset viewer.