Changeset 9949 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 14 Feb 2013, 16:32:40 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r9925 r9949 100 100 """ 101 101 102 def getPDFCreator(context): 103 """Get some IPDFCreator instance suitable for use with `context`. 104 """ 105 102 106 def renderPDF(view, subject='', filename='slip.pdf',): 103 107 """Render pdf slips for various pages. -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r9948 r9949 252 252 # Draw each signature field one under another (vertically) 253 253 for num, signature in enumerate(signatures): 254 line = (num - 1) * 2254 line = len(data) 255 255 sig_style.extend(( 256 256 ('TOPPADDING', (0, line), (-1, line), 32), … … 537 537 return 538 538 style = getSampleStyleSheet() 539 creator = getUtility(IPDFCreator)539 creator = self.getPDFCreator(student) 540 540 data = [] 541 541 doc_title = view.label … … 585 585 return pdf_stream 586 586 587 def getPDFCreator(self, context): 588 """Get a pdf creator suitable for `context`. 589 590 The default implementation always returns the default creator. 591 """ 592 return getUtility(IPDFCreator) 593 587 594 def renderPDF(self, view, filename='slip.pdf', student=None, 588 595 studentview=None, … … 595 602 # XXX: tell what the different parameters mean 596 603 style = getSampleStyleSheet() 597 creator = getUtility(IPDFCreator)604 creator = self.getPDFCreator(student) 598 605 data = [] 599 606 doc_title = view.label
Note: See TracChangeset for help on using the changeset viewer.