[reportlab-users] SimpleDocTemplate? two columns?

Andy Robinson andy at reportlab.com
Fri Jun 17 12:28:39 EDT 2005

> I suspect I need to use frames...  But I don't see a way to
> setup SimpleDocTemplate to use two different frames per page...
> Do I need to step away from SimpleDocTemplate, since a two
> column report isn't "Simple"?

Exactly.  "SimpleDocTemplate" is a special case which is easy
to construct if you need just one frame.  For anything else
you create a "BaseDocTemplate" and explicitly add PageTemplate
and  Frame objects to it.  One natural way to do it would
be to make a "MyDocTemplate" subclass whose __init__ method
adds the page templates (e.g. "cover" with one column,
"body" with two columns).

Also, they are frames not columns.  They don't have to
run vertically next to each other; you can do any layout
you want.

You might find it informative to look at the commercial
RML test suite; you can mentally translate the XML to platypus
objects very easily, which are what it does under the hood. 
I'd make the same advice to anyone learning Platypus.  Look at 
tests 003 004 in RML and PDF here...


(and if anyone had the energy to make some teaching equivalents
for Platypus, we'd love to check them in...)

Hope this helps,


More information about the reportlab-users mailing list