[reportlab-users] Producing pages out of order - possible?
bat at flurf.net
Tue Apr 29 08:05:25 EDT 2008
Andy Robinson wrote:
> It occurs to me that perhaps a good, well-documented example of Approach 1
> might remove most of the needs for a "table of contents flowable" and
The TOC doesn't need to be "flowable" in the way that text in a
paragraph is - we can assume that the text of a contents entry and the
associate page number will fit happily on one line, so that's OK. But
it will be multi-page, and I won't know how many pages until I've read
through the database once; I could do that for an optimisation, I
suppose, and then only need to go back and fill in the page numbers. So
> You only really need multi-pass for references within a paragraph, where you
> don't know how wide the text string is going to be until later because you don't
> know yet if it's going to say 'page 9' or 'page 10'
Ideally, I want each page to have a centred footer with the text "Page X
of Y" where Y is the total number of pages; obviously that will need to
be filled in retroactively too. So it looks like two passes: one to
produce the numberless table of contents and the actual body of the
document, and one to go back and fill in page numbers in the TOC and on
Sounds doable, I think, based on what you've said. Excellent! Goodbye,
Rasmus, hello Guido!
: P :
More information about the reportlab-users