当前位置: 首页>>代码示例>>Python>>正文


Python BaseDocTemplate.multiBuild方法代码示例

本文整理汇总了Python中reportlab.platypus.doctemplate.BaseDocTemplate.multiBuild方法的典型用法代码示例。如果您正苦于以下问题:Python BaseDocTemplate.multiBuild方法的具体用法?Python BaseDocTemplate.multiBuild怎么用?Python BaseDocTemplate.multiBuild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在reportlab.platypus.doctemplate.BaseDocTemplate的用法示例。


在下文中一共展示了BaseDocTemplate.multiBuild方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _showDoc

# 需要导入模块: from reportlab.platypus.doctemplate import BaseDocTemplate [as 别名]
# 或者: from reportlab.platypus.doctemplate.BaseDocTemplate import multiBuild [as 别名]
def _showDoc(fn,story):
    pageTemplate = PageTemplate('normal', [Frame(72, 440, 170, 284, id='F1'),
                            Frame(326, 440, 170, 284, id='F2'),
                            Frame(72, 72, 170, 284, id='F3'),
                            Frame(326, 72, 170, 284, id='F4'),
                            ], myMainPageFrame)
    doc = BaseDocTemplate(outputfile(fn),
            pageTemplates = pageTemplate,
            showBoundary = 1,
            )
    doc.multiBuild(story)
开发者ID:makinacorpus,项目名称:reportlab-ecomobile,代码行数:13,代码来源:test_platypus_pleaseturnover.py

示例2: multiBuild

# 需要导入模块: from reportlab.platypus.doctemplate import BaseDocTemplate [as 别名]
# 或者: from reportlab.platypus.doctemplate.BaseDocTemplate import multiBuild [as 别名]
	def multiBuild(self,flowables,onFirstPage=_doNothing, onLaterPages=_doNothing): 
		self._calc() #in case we changed margins sizes etc 
		frameFirst = Frame(2*cm, 2*cm, 17*cm, 23*cm, id='F1')
		frameLater = Frame(2.5*cm, 2*cm, 16*cm, 24.5*cm, id='F2')
		
		self.addPageTemplates([
			PageTemplate (id='First',frames=frameFirst, onPage=onFirstPage, pagesize=self.pagesize), 
			PageTemplate(id='Later',frames=frameLater, onPage=onLaterPages, pagesize=self.pagesize)
		]) 
		
		BaseDocTemplate.multiBuild(self,flowables) 
开发者ID:PicciMario,项目名称:SimBrush,代码行数:13,代码来源:report.py

示例3: _showDoc

# 需要导入模块: from reportlab.platypus.doctemplate import BaseDocTemplate [as 别名]
# 或者: from reportlab.platypus.doctemplate.BaseDocTemplate import multiBuild [as 别名]
def _showDoc(fn, story):
    pageTemplate = PageTemplate(
        "normal",
        [
            Frame(72, 440, 170, 284, id="F1"),
            Frame(326, 440, 170, 284, id="F2"),
            Frame(72, 72, 170, 284, id="F3"),
            Frame(326, 72, 170, 284, id="F4"),
        ],
        myMainPageFrame,
    )
    doc = BaseDocTemplate(outputfile(fn), pageTemplates=pageTemplate, showBoundary=1)
    doc.multiBuild(story)
开发者ID:eduardocereto,项目名称:reportlab,代码行数:15,代码来源:test_platypus_pleaseturnover.py

示例4: _breakingTestCase

# 需要导入模块: from reportlab.platypus.doctemplate import BaseDocTemplate [as 别名]
# 或者: from reportlab.platypus.doctemplate.BaseDocTemplate import multiBuild [as 别名]

#.........这里部分代码省略.........
    def ColorParagraph(c,text,style):
        return Paragraph('<para color=%s>%s</para>' % (c,text),style)

    def ptoblob(blurb,content,trailer=None,header=None, story=story, H1=H1):
        if type(content) not in (type([]),type(())): content = [content]
        story.append(PTOContainer([Paragraph(blurb,H1)]+list(content),trailer,header))

    text2 ='''We have already seen that the natural general principle that will
subsume this case cannot be arbitrary in the requirement that branching
is not tolerated within the dominance scope of a complex symbol.
Notice, incidentally, that the speaker-hearer's linguistic intuition is
to be regarded as the strong generative capacity of the theory.  A
consequence of the approach just outlined is that the descriptive power
of the base component does not affect the structure of the levels of
acceptability from fairly high (e.g. (99a)) to virtual gibberish (e.g.
(98d)).  By combining adjunctions and certain deformations, a
descriptively adequate grammar cannot be arbitrary in the strong
generative capacity of the theory.'''
    text1='''
On our assumptions, a descriptively adequate grammar delimits the strong
generative capacity of the theory.  For one thing, the fundamental error
of regarding functional notions as categorial is to be regarded as a
corpus of utterance tokens upon which conformity has been defined by the
paired utterance test.  A majority  of informed linguistic specialists
agree that the appearance of parasitic gaps in domains relatively
inaccessible to ordinary extraction is necessary to impose an
interpretation on the requirement that branching is not tolerated within
the dominance scope of a complex symbol.  It may be, then, that the
speaker-hearer's linguistic intuition appears to correlate rather
closely with the ultimate standard that determines the accuracy of any
proposed grammar.  Analogously, the notion of level of grammaticalness
may remedy and, at the same time, eliminate a general convention
regarding the forms of the grammar.'''
    
    text0 = '''To characterize a linguistic level L,
this selectionally introduced contextual
feature delimits the requirement that
branching is not tolerated within the
dominance scope of a complex
symbol. Notice, incidentally, that the
notion of level of grammaticalness
does not affect the structure of the
levels of acceptability from fairly high
(e.g. (99a)) to virtual gibberish (e.g.
(98d)). Suppose, for instance, that a
subset of English sentences interesting
on quite independent grounds appears
to correlate rather closely with an
important distinction in language use.
Presumably, this analysis of a
formative as a pair of sets of features is
not quite equivalent to the system of
base rules exclusive of the lexicon. We
have already seen that the appearance
of parasitic gaps in domains relatively
inaccessible to ordinary extraction
does not readily tolerate the strong
generative capacity of the theory.'''
    t0 = [ColorParagraph('blue','Please turn over', pto )]
    h0 = [ColorParagraph('blue','continued from previous page', pto )]
    t1 = [ColorParagraph('red','Please turn over(inner)', pto )]
    h1 = [ColorParagraph('red','continued from previous page(inner)', pto )]
    ptoblob('First Try at a PTO',[Paragraph(text0,bt)],t0,h0)
    fbreak()
    c1 = Table([('alignment', 'align\012alignment'),
                ('bulletColor', 'bulletcolor\012bcolor'),
                ('bulletFontName', 'bfont\012bulletfontname'),
                ('bulletFontSize', 'bfontsize\012bulletfontsize'),
                ('bulletIndent', 'bindent\012bulletindent'),
                ('firstLineIndent', 'findent\012firstlineindent'),
                ('fontName', 'face\012fontname\012font'),
                ('fontSize', 'size\012fontsize'),
                ('leading', 'leading'),
                ('leftIndent', 'leftindent\012lindent'),
                ('rightIndent', 'rightindent\012rindent'),
                ('spaceAfter', 'spaceafter\012spacea'),
                ('spaceBefore', 'spacebefore\012spaceb'),
                ('textColor', 'fg\012textcolor\012color')],
            style = [
                ('VALIGN',(0,0),(-1,-1),'TOP'),
                ('INNERGRID', (0,0), (-1,-1), 0.25, black),
                ('BOX', (0,0), (-1,-1), 0.25, black),
                ],
            )
    ptoblob('PTO with a table inside',c1,t0,h0)
    fbreak()
    ptoblob('A long PTO',[Paragraph(text0+' '+text1,bt)],t0,h0)
    fbreak()
    ptoblob('2 PTO (inner split)',[ColorParagraph('pink',text0,bt),PTOContainer([ColorParagraph(black,'Inner Starts',H1),ColorParagraph('yellow',text2,bt),ColorParagraph('black','Inner Ends',H1)],t1,h1),ColorParagraph('magenta',text1,bt)],t0,h0)

    pageTemplate = PageTemplate('normal', [Frame(2.5*cm, 15.5*cm, 6*cm, 10*cm, id='F1'),
                            Frame(11.5*cm, 15.5*cm, 6*cm, 10*cm, id='F2'),
                            Frame(2.5*cm, 2.5*cm, 6*cm, 10*cm, id='F3'),
                            Frame(11.5*cm, 2.5*cm, 6*cm, 10*cm, id='F4'),
                            ], myMainPageFrame)
    doc = BaseDocTemplate(outputfile('test_platypus_pto.pdf'),
            pageTemplates = pageTemplate,
            showBoundary = 1,
            )
    doc.multiBuild(story)
开发者ID:eaudeweb,项目名称:naaya,代码行数:104,代码来源:test_platypus_pto.py

示例5: multiBuild

# 需要导入模块: from reportlab.platypus.doctemplate import BaseDocTemplate [as 别名]
# 或者: from reportlab.platypus.doctemplate.BaseDocTemplate import multiBuild [as 别名]
 def multiBuild(self, flowables,onFirstPage=_doNothing, onLaterPages=_doNothing, canvasmaker=canvas.Canvas):
     BaseDocTemplate.multiBuild(self,flowables, canvasmaker=canvasmaker) 
开发者ID:the-lo-ni-us,项目名称:rpk-teilnehmerbogen,代码行数:4,代码来源:pdf_doku_template.py


注:本文中的reportlab.platypus.doctemplate.BaseDocTemplate.multiBuild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。