[reportlab-users] Number of pages in a pdf file
David Hughes
reportlab-users@reportlab.com
Wed, 11 Jun 2003 11:55 +0100 (BST)
I'm developing an application that uses Reportlab to output reports and
have created a pre-viewer using wxPython that displays pages temporarily
converted to .png using GhostScript. It is similar in effect to Acrobat
except it isn't decorated with all the trimmings and just has page
navigation buttons, zoom, print and save. (I can share it if anyone's
interested)
Because the pdf has just been created, I can ask Reportlab to tell me the
page size and number of pages but I would like to extend the functionality
to view pdf files that have been saved in the past, so is there any way to
retrieve this information from the pdf file itself? I guess there must be,
because you can buy tools to do it but, *given that the files are always
created using Reportlab*, is there a relatively simply and reliable way to
extract this information?
With thanks for any help.
Regards,
David Hughes
Forestfield Software Ltd
www.forestfield.co.uk