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)
评论列表
文章目录