[reportlab-users] Using Frames in SimpleDocTemplates

Daniel Crespo dcrespo at grupozoom.com
Mon Mar 13 10:06:48 EST 2006


Hi to all!

How can I use Frames in the below example of SimpleDocTemplate?

from reportlab.lib.pagesizes import letter
from reportlab.platypus import Paragraph, SimpleDocTemplate
styles = getSampleStyleSheet()
styleN = styles['Normal']
styleH = styles['Heading1']
story = []
#add some flowables
story.append(Paragraph("This is a Heading",styleH))
story.append(Paragraph("This is a paragraph in <i>Normal</i> style.",
styleN))
doc = SimpleDocTemplate('mydoc.pdf',pagesize = letter)
doc.build(story)

Until now, I think that the Frame only works with Canvas and not with 
SimpleDocTemplate, but I'm not sure (I have read all the things regarding 
Frames and SimpleDocTemplates)...

Thanks

Daniel 



More information about the reportlab-users mailing list