[reportlab-users] Page numbers problem

Ram Sundar ram0812 at gmail.com
Tue Mar 14 04:56:44 EST 2006


Hello guys,
    I have a number of pages that I bulid using
BaseDocTemplate.multibuild() method.
The pages are long and the contents like tabes can span more than one
page and so I am using the PTOContainer class for assembling all the
flowables in the page.
What I am wondering here is:

1. The PDF document has an introduction page where it should list the
title of each page and their respective page numbers. I am not sure
how I can get this page title and page number to work in the intro
page. Should I build the other pages first before I build the intro
page? If so how do I do that?

2. I am not sure how to get the page title for creating the bookmark name work.
Today I am having a separate method called create_footer that is
called during PageTemplate creation to get the page numbers from the
canvas object. But I do not know how to get the page title
below is a code snippet of what I do
pTemplate = PageTemplate('normal', [Frame(70, 70, A4[0]-140, A4[1]-140),
                                    ], None, self.create_footer)
doc = BaseDocTemplate(filepath,
                              pageTemplates = pTemplate,
                              showBoundary = 0,
                              )

Any help ould be appreciated.

Thanks,
/R


More information about the reportlab-users mailing list