本文整理汇总了Python中reportlab.platypus.Frame方法的典型用法代码示例。如果您正苦于以下问题:Python platypus.Frame方法的具体用法?Python platypus.Frame怎么用?Python platypus.Frame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类reportlab.platypus
的用法示例。
在下文中一共展示了platypus.Frame方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: demo1
# 需要导入模块: from reportlab import platypus [as 别名]
# 或者: from reportlab.platypus import Frame [as 别名]
def demo1(canvas):
frame = Frame(
2*inch, # x
4*inch, # y at bottom
4*inch, # width
5*inch, # height
showBoundary = 1 # helps us see what's going on
)
bodyStyle = ParagraphStyle('Body', fontName=_baseFontName, fontSize=24, leading=28, spaceBefore=6)
para1 = Paragraph('Spam spam spam spam. ' * 5, bodyStyle)
para2 = Paragraph('Eggs eggs eggs. ' * 5, bodyStyle)
mydata = [para1, para2]
#this does the packing and drawing. The frame will consume
#items from the front of the list as it prints them
frame.addFromList(mydata,canvas)
示例2: _create_frame
# 需要导入模块: from reportlab import platypus [as 别名]
# 或者: from reportlab.platypus import Frame [as 别名]
def _create_frame(self, pagesize):
frame = Frame(self.lr_margin, inch, self.para_width, self.pg_h-2*inch)
return frame
示例3: test1
# 需要导入模块: from reportlab import platypus [as 别名]
# 或者: from reportlab.platypus import Frame [as 别名]
def test1():
c = Canvas('figures.pdf')
f = Frame(inch, inch, 6*inch, 9*inch, showBoundary=1)
v = PlatPropFigure1()
v.captionTextColor = toColor('blue')
v.captionBackColor = toColor('lightyellow')
f.addFromList([v],c)
c.save()