[reportlab-users] number of pages

Michael Schulz mschulz at webgis.de
Tue Jun 28 10:24:47 EDT 2005


thanks for your replies. Yeah i think i found the old threat about the 
"x of y pages" but haven't used forms yet and also realized that this 
seems only to work with BaseDocTemplate not with SimpleDocTemplate. So I 
would have to switch to BaseDocTemplate?

That's what i tried now:
Create a new derived SimpleDocTemplate and override the _endBuild method 
(is that possible here?). Add the proposed code snipplet (3) and add the 
doForm command to the onFirstPage method of the derived SimpleDocTemplate.

But i get an error:

KeyError: "forward reference to 'FormXob.pageCount' not resolved upon 
final formatting"

which following the source code is raised when the form is not defined 
upon saving, so i assume the overriding of endBuild hasn't worked. Hmpf!

Cheers, Michael

Michael Schulz                            mschulz at webgis.de

in medias res  Gesellschaft für Informationstechnologie mbH

In den Weihermatten 66              Tel +49 (0)761 556959-5
79108 Freiburg                      Fax +49 (0)761 556959-6

                www.webgis.de / www.zopecms.de
NEU ++ UMN MapServer Hosting ++ http://www.webgis.de ++ NEU

More information about the reportlab-users mailing list