[reportlab-users] Reportlab performance
Robin Becker
robin at reportlab.com
Mon May 17 05:12:19 EDT 2010
On 17/05/2010 09:27, Andy Robinson wrote:
> On 17 May 2010 08:04, 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? ;-)
.......
I don't think this is really a platypus specific problem; the canvas code array
stores all of the pdf operations prior to the final rendering which happens wne
save is called. I think what really matters is whether those operations contain
any position dependent values; if not then it should be possible to collect the
code from the TOC/Front matter pages at the end and then re-inject at the front
of the actual document. However this requires support from the canvas layer
rather than platypus since proviing the _code locations can be recorded some
fairly simple flowables woud do the trick.
--
Robin Becker
More information about the reportlab-users
mailing list