Changeset 9949 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 14 Feb 2013, 16:32:40 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py
r9948 r9949 96 96 return data 97 97 98 def _getPDFCreator(self): 99 return getUtility(IPDFCreator) 100 98 101 def __call__(self, view=None, note=None): 99 102 """Return a PDF representation of the context applicant. … … 109 112 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 110 113 separators = getUtility(IApplicantsUtils).SEPARATORS_DICT 111 creator = getUtility(IPDFCreator)114 creator = self._getPDFCreator() 112 115 113 116 # append history -
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.