Changeset 9657 for main/waeup.kofa
- Timestamp:
- 17 Nov 2012, 08:24:15 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py
r9555 r9657 393 393 pdf_stream, 394 394 bottomMargin=bottomMargin, 395 topMargin=1. 3*inch,395 topMargin=1.5*inch, 396 396 title=title, 397 397 pagesize=portrait(A4), -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports.py
r9654 r9657 137 137 table_data = tbl_data_to_table(*self.data) 138 138 col_widths = [None,] + [1.6*cm] * len(self.data[1]) + [None,] 139 #pdf_data = [Paragraph('<b>Study mode:</b> %s' % self.mode, 140 # STYLE["Normal"]), 141 # Spacer(1, 12),] 142 pdf_data = [ 139 creation_dt = self.creation_dt.astimezone(getUtility(IKofaUtils).tzinfo) 140 creation_dt = creation_dt.strftime("%Y-%m-%d %H:%M:%S %Z") 141 pdf_data = [Paragraph('<b>%s</b>' % creation_dt, 142 STYLE["Normal"]), 143 Spacer(1, 12),] 144 pdf_data += [ 143 145 Table(table_data, style=TABLE_STYLE, colWidths=col_widths)] 144 doc_title = '%s Students in Session %s' % ( 145 self.mode, 146 self.session,) 146 doc_title = '%s Students in Session %s' % (self.mode, self.session) 147 147 pdf = creator.create_pdf( 148 148 pdf_data, None, doc_title, self.author, 149 'Students in Session %s ,' % self.session)149 'Students in Session %s' % self.session) 150 150 open('/tmp/result.pdf', 'wb').write(pdf) 151 151 return pdf
Note: See TracChangeset for help on using the changeset viewer.