[reportlab-users] Reportlab performance

Henning von Bargen H.vonBargen at t-p.com
Tue May 18 03:20:11 EDT 2010

Andy Robinson wrote:

> Henning von Bargen <H.vonBargen at t-p.com> wrote:

> > Another idea that came to my mind:

> ...

> > 3. In the final step of the PDF creation process, when

> > ? the /Pages object is written, just put the TOC pages

> > ? before the content pages.

> This is a good idea. Very often the cover, TOC and other 'front

> matter' can be printed without visible numbers. Reordering pages at

> the end might not be too hard.

> We need an API which allows this to work with Platypus without

> massive changes.

> Some way to say "the following pages / story-sections

> eventually belong elsewhere in the document; make them now but flag

> them". Or perhaps even "reserve some blank pages, jump ahead, then

> compact and remove unused ones at the end". Then have a final

> 'reshuffle' pass at the end. Of course the reordering pass needs

> to 'offset' the target page numbers as they will have moved.


> How about ActionFlowables called GoTo and GoSub? ;-)

Robin Becker wrote:

> I have it wrong, it seems that as we progress through the document we push

> the lastest _code into the pdfdoc as pages are created. So in order to

> inject the TOC contents into the PDF at the right place we need to use an

> even lower level than the canvas.

Probably somewhere in pdfdoc.py, when the /Pages dict is written
(in class PDFCatalog or PDFPages?)


More information about the reportlab-users mailing list