Changeset 10596 for main/waeup.kofa/trunk
- Timestamp:
- 7 Sep 2013, 04:19:27 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py
r10333 r10596 27 27 from waeup.kofa.browser import DEFAULT_PASSPORT_IMAGE_PATH 28 28 from waeup.kofa.browser.interfaces import IPDFCreator 29 from waeup.kofa.browser.pdf import SMALL_PARA_STYLE, ENTRY1_STYLE 29 from waeup.kofa.browser.pdf import SMALL_PARA_STYLE, ENTRY1_STYLE, get_qrcode 30 30 from waeup.kofa.interfaces import IExtFileStore, IPDF, IKofaUtils 31 31 from waeup.kofa.interfaces import MessageFactory as _ … … 131 131 data.append(Spacer(1, 5)) 132 132 133 # create t wo-column header table133 # create three-column header table 134 134 # append photograph to the left 135 135 img_path = getattr( … … 139 139 table_left = Table(data_left,style=SLIP_STYLE) 140 140 141 # append column-two fields to the right141 # append base data table to the middle 142 142 fields = [ 143 143 field for field in self.form_fields 144 144 if field.__name__ in self.column_two_fields] 145 table_ right= creator.getWidgetsTable(145 table_middle = creator.getWidgetsTable( 146 146 fields, self.context, None, lang=portal_language, 147 separators=None, colWidths=[5*cm, 6*cm]) 148 header_table = Table([[table_left, table_right],],style=SLIP_STYLE) 147 separators=None, colWidths=[5*cm, 4.5*cm]) 148 149 # append QR code to the right 150 if view is not None: 151 url = view.url(self.context, 'application_slip.pdf') 152 data_right = [[get_qrcode(url, width=70.0)]] 153 table_right = Table(data_right,style=SLIP_STYLE) 154 else: 155 table_right = None 156 157 header_table = Table( 158 [[table_left, table_middle, table_right],],style=SLIP_STYLE) 149 159 data.append(header_table) 150 160
Note: See TracChangeset for help on using the changeset viewer.