[reportlab-users] Producing pages out of order - possible?

Robin Becker robin at reportlab.com
Tue Apr 29 07:38:59 EDT 2008

Paul Sleigh wrote:

> G'day. I've got a project I wrote in PHP using an open source PDF

> generation library, but it's slow and a huge memory hog, and I'm hoping

> to move it over to something a little less ugly. One feature I need is

> the ability to produce pages out of order: that is, generate the body of

> a document as pages N+1 to N+M, then an N-page table of contents at the

> beginning, with the page numbers in the form "Page 1 of X" filled in as

> the last step. The table of contents has to be at the start if at all

> possible because that's what the user had with his original

> Word-macro-chewing-gum-and-string version, and he's resistant to change,

> but obviously it has to have that generated after the body of the

> document because otherwise there's no way to know which item goes on

> which page.


> So, my question: can I do this using the ReportLab tool? If so, I think

> you've found a lifelong friend; if not, I fear I may have to come up

> with some other solution, and I'm running out of ideas.


> What can you tell me?


> : Paul :

Well there is a table of contents example which dinu was playing with recently,
but I don't know if the TOC is multipage. The platypus layout stuff does support
some kind of multi-pass approach as well, but I'm not terribly familiar with the
multi-pass aspects.
Robin Becker

More information about the reportlab-users mailing list