Changeset 9913 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 26 Jan 2013, 10:55:22 (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
r9910 r9913 397 397 398 398 def create_pdf(self, data, headerline=None, title=None, author=None, 399 footer='', note=None, sigs_in_footer=[] ):399 footer='', note=None, sigs_in_footer=[], topMargin=1.5): 400 400 """Returns a binary data stream which is a PDF document. 401 401 """ … … 405 405 pdf_stream, 406 406 bottomMargin=bottomMargin, 407 topMargin= 1.5*inch,407 topMargin=topMargin*inch, 408 408 title=title, 409 409 pagesize=portrait(A4), -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r9912 r9913 551 551 tableheader_2=None, tabledata_2=None, 552 552 note=None, signatures=None, sigs_in_footer=(), 553 show_scans=True ):553 show_scans=True, topMargin=1.5): 554 554 """Render pdf slips for various pages. 555 555 """ … … 560 560 author = '%s (%s)' % (view.request.principal.title, 561 561 view.request.principal.id) 562 footer_text = view.label.split('\n')[0] 562 footer_text = view.label.split('\n') 563 if len(footer_text) > 2: 564 # We can add a department in first line 565 footer_text = footer_text[1] 566 else: 567 # Onle the first line is used for the footer 568 footer_text = footer_text[0] 563 569 if getattr(student, 'student_id', None) is not None: 564 570 footer_text = "%s - %s - " % (student.student_id, footer_text) … … 620 626 pdf_stream = creator.create_pdf( 621 627 data, None, doc_title, author=author, footer=footer_text, 622 note=note, sigs_in_footer=sigs_in_footer )628 note=note, sigs_in_footer=sigs_in_footer, topMargin=topMargin) 623 629 except IOError: 624 630 view.flash('Error in image file.')
Note: See TracChangeset for help on using the changeset viewer.