[reportlab-users] Moving to next frame in Platypus

Amit amit.uttam at gmail.com
Mon Jun 27 15:51:11 EDT 2005

Hi everyone,

I have started using Platypus and reportlab extensively over the past week. 
I have found platypus to be very powerful yet simple and intuitive (in most 

However, my problem arised when I had multiple frames in one page and I was 
trying to place paragraphs, tables, etc. into these frames. I couldn't 
figure out how to move the "cursor", so to speak, so I can place items on 
the next frame. Reading up on the Reportlab RML, they use the <nextFrame/> 
tag. I expected there should be a similar platypus function nextFrame() but 
I couldn't find it.

For example :

# define frames - for frames in page
frameHeader = Frame(x1=0*inch, y1=7.5*inch, width=11*inch, height=1*inch)
frameChart1 = Frame(x1=0*inch, y1=5*inch, width=5.5*inch, height=5*inch)

# define pageTemplates - for page in document
mainPage = PageTemplate(frames=frameHeader)

# define BasicDocTemplate - for document
doc = BaseDocTemplate('report_1.pdf', pagesize=landscape(letter),
pageTemplates=mainPage, leftMargin=72,
title=Title, author=Author, showBoundary=1)

# styles
styles = getSampleStyleSheet()
styleH = styles['Heading1']

# create a story
story = []
story.append(Paragraph("This is a Heading for the Report", styleH))
story.append(FrameBreak()) # this is the point where I want it to move to 
next frame
# but apparently FrameBreak() causes a page break
story.append(Paragraph("This is where chart1 for laptops would be located", 

# build story

Thanks for all your help,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20050627/6e21198a/attachment.html

More information about the reportlab-users mailing list