Пример #1
0
 def __init__(self, filename="/tmp/rpt001.pdf", **kw):
     """
     constructor of the object
     """
     RptSuperclass.__init__(self)
     self._element_type = "document"
     BaseDocTemplate.__init__(self, filename, **kw)
     self.pagesize = A4
     self.title = u"ict-ok.org Report"
     self.author = u"ict-ok.org"
     self.subject = u"ict-ok.org Report"
     self.leftMargin = 2*cm
     self.rightMargin = 2*cm
     self.topMargin = 2*cm
     self.bottomMargin = 2*cm
     self.showBoundary = False
     #self.allowSplitting = False
     rptFrame01 = RptFrame(2*cm, 25*mm, 165*mm, 24.7*cm) # , showBoundary=True)
     rptPageT01 = RptPageTemplate(u"RptTP1", [rptFrame01], pagesize=A4)
     self.addPageTemplates(rptPageT01)
     registerRptFonts()
     #addMappingRptFonts()
     self.styles = getRptStyleSheet()
     self.seq = Sequencer()
     self.seq.chain('Chapter01', 'Chapter02')
     self.seq.chain('Chapter02', 'Chapter03')
     self.seq.chain('Chapter03', 'Chapter04')
     self.seq.chain('Chapter04', 'Chapter05')
     self.seq.chain('Chapter05', 'Chapter06')
     self.volumeNo = None
     self.authorName = None
     self.versionStr = None
     self.firstPageTitle = None
     self.lastPageTitle = None
     self.firstH1Seen = False
Пример #2
0
 def __init__(self, text, intype='Heading1', doc=None, context=None):
     """
     constructor of the object
     """
     RptSuperclass.__init__(self, doc, context)
     self.setText(text)
     self._element_type = "title"
     self._type = intype
Пример #3
0
 def __init__(self, text, style = None, bulletText = None, \
              frags=None, caseSensitive=1, encoding='utf8', doc = None):
     """
     constructor of the object
     """
     RptSuperclass.__init__(self, doc)
     if style:
         style_d = style
     elif doc:
         style_d = doc.styles['Para']
     else:
         style_d = None
     Paragraph.__init__(self, text, style_d, bulletText, \
                        frags, caseSensitive, encoding)
     self._element_type = "paragraph"
Пример #4
0
 def __init__(self, text, style = None, bulletText = None, \
              frags=None, caseSensitive=1, encoding='utf8', doc = None):
     """
     constructor of the object
     """
     RptSuperclass.__init__(self, doc)
     if style:
         style_d = style
     elif doc:
         style_d = doc.styles['Para']
     else:
         style_d = None
     try:
         Paragraph.__init__(self, text, style_d, bulletText, \
                            frags, caseSensitive, encoding)
     except ValueError, errText:
         logger.error(u'Error in RptPara: <%s>' % errText)
         logger.error(u'orig. Text: <%s>' % text)
Пример #5
0
 def __init__(self):
     """
     constructor of the object
     """
     RptSuperclass.__init__(self)
     self._element_type = "chapter"