[Zope] Using ReportLab with Zope

Richard Folwell richard@folwell.com
Sat, 20 May 2000 17:28:51 +0100


To sound out what, if anything, other people are doing in this area:

I am interested in using ReportLab with Zope, to provide an improved printed version of
web-published documents.  What I want to do is fairly straightforward, to create a PDF file with:

 - a title/cover page with control information
 - a table of contents
 - the body of the document, with a technical document style header and footer (title, docref,
revision, date, page x of numpages, etc)

Indexing would be nice, but that involves much more complexity and is outside the scope of what I
need right now.

Currently I have documents published from Zope, sourced either as HTML (DTML documents) or XML, with
the intention to also produce documents whose content will come mostly from a database (clearly
straightforward in Zope).

I think what I need to do is find some way of re-directing the output from Zope (what would normally
go to the browser) to an external program, which uses ReportLab to generate the PDF file from the
HTML stream, and returns the location of the file to Zope to pass to the browser as a re-direct (so
the browser gives the user the option to view or download the PDF file).

Is this correct?  Is anyone already working in this direction?  Any hints or tips?

Richard