Changeset 8104
- Timestamp:
- 11 Apr 2012, 09:38:18 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py
r8102 r8104 285 285 canvas.drawRightString( 286 286 width-2.2*cm, 0.5 * inch, 287 translate(_(u'page ${a}' , mapping = {'a':doc.page}))) 287 translate(_(u'${b} Page ${a}' , mapping = {'a':doc.page, 288 'b':doc.kofa_footer}))) 288 289 canvas.restoreState() 289 290 canvas.restoreState() 291 292 # Metadata 293 canvas.setAuthor(getattr(doc, 'kofa_author', 'Unknown')) 294 canvas.setSubject(title) 295 canvas.setCreator(u'WAeUP Kofa') 290 296 return 291 297 292 def create_pdf(self, data, headerline=None, title=None): 298 def create_pdf(self, data, headerline=None, title=None, author=None, 299 footer=''): 293 300 """Returns a binary data stream which is a PDF document. 294 301 """ … … 308 315 doc.kofa_headtitle = headerline 309 316 doc.kofa_title = title 317 doc.kofa_author = author 318 doc.kofa_footer = footer 310 319 doc.build(data, onFirstPage=self.paint_background, 311 320 onLaterPages=self.paint_background)
Note: See TracChangeset for help on using the changeset viewer.