[reportlab-users] Template examples?

Ken Corey ken at kencorey.com
Sun Apr 19 16:59:48 EDT 2009


The document I'm interested in creating has several types of page:
First page, general body page, section start page, appendix start page,
appendix body page...and probably others that I don't yet know about.

I saw the Hello World example for SimpleDocTemplate that creates 100
paragraphs in the document, and has a separate handler for the first
page than from the rest of the pages. I can see how I could subclass
BaseDocTemplate, and perhaps add special pages for each situation
(though I'm fuzzy how I would specify that page 6 is regular, page 7 is
section start, page 8-12 is general body, page 13 is section start
again, etc.)

If anyone has any template classes like this that they'd care to share,
I've got *lots* to learn (just ask my wife...:^)

Anyway, I also saw on a web page
(http://achievewith.us/public/articles/2007/02/21/produce-pdf-pages-with-turbogears-cheetah-and-reportlab)
a tantalising discussion about a template built using a Cheetah
templating tool like so:
<doc>
<para>some text...
</doc>

Has anyone tried mixing reportlabs' PDF tool's templates and Cheetah
templates? Any thoughts on whether this would make it easier or harder
than reportlab's templates only?

-Ken


More information about the reportlab-users mailing list