Ignore:
Timestamp:
24 Jan 2013, 10:34:02 (12 years ago)
Author:
Henrik Bettermann
Message:

Condense all pdf slips. Re-use ENTRY1_STYLE in render_student_data.

File:
1 edited

Legend:

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

    r9657 r9910  
    4141NORMAL_STYLE = getSampleStyleSheet()['Normal']
    4242
     43#: A reportlab paragraph style for 'normal' output.
     44HEADING3_STYLE = getSampleStyleSheet()['Heading3']
     45
     46#: A reportlab paragraph style for headings.
     47HEADING_STYLE = ParagraphStyle(
     48    name='Heading3',
     49    parent=HEADING3_STYLE,
     50    fontSize=11,
     51    )
     52
    4353#: A reportlab paragraph style for output of 'code'.
    4454CODE_STYLE = ParagraphStyle(
     
    4757    fontName='Courier',
    4858    fontSize=10,
     59    leading=10,
    4960    )
    5061
     
    5364    name='Entry1',
    5465    parent=NORMAL_STYLE,
    55     fontSize=12,
     66    fontSize=11,
     67    leading=10,
    5668    )
    5769
     
    6072    name='Small1',
    6173    parent=NORMAL_STYLE,
    62     fontSize=10,
     74    fontSize=8,
    6375    )
    6476
     
    6880    parent=NORMAL_STYLE,
    6981    fontName='Helvetica-Bold',
    70     fontSize=12,
     82    fontSize=10,
    7183    )
    7284
     
    7688    parent=NORMAL_STYLE,
    7789    fontName='Helvetica',
    78     fontSize=12,
     90    fontSize=10,
    7991    )
    8092
     
    285297            f_label = translate(widget.label.strip(), domain,
    286298                                target_language=lang)
    287             f_label = Paragraph(f_label, ENTRY1_STYLE)
     299            f_label = Paragraph('%s:' % f_label, ENTRY1_STYLE)
    288300            f_text = translate(widget(), domain, target_language=lang)
    289301            f_text = format_html(f_text)
     
    304316
    305317        # Create table
    306         table = Table(table_data,style=table_style)
     318        table = Table(table_data,style=table_style) #, rowHeights=14)
    307319        table.hAlign = 'LEFT'
    308320        return table
Note: See TracChangeset for help on using the changeset viewer.