count pages in a pdf

Tim Golden mail at timgolden.me.uk
Tue Nov 27 11:51:12 EST 2007


belred at gmail.com wrote:
> is it possible to parse a pdf file in python?  for starters, i would
> like to count the number of pages in a pdf file.  i see there is a
> project called ReportLab, but it seems to be a pdf generator... i
> can't tell if i would be able to parse a pdf file programmically.

Well the simple expedient of putting "python count pages pdf" into
Google turned up the following link:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496837

and no few others. Might be worth a look?

TJG



More information about the Python-list mailing list