[reportlab-users] Count pages in PDF?

Jerome Alet reportlab-users@reportlab.com
Wed, 17 Mar 2004 21:56:39 +0100


On Wed, Mar 17, 2004 at 08:42:03PM -0000, Andy Robinson wrote:
> > Is there anything reportlab-ish that can quickly count the number
> > of pages in a PDF?
> >
> > If not, how do people do that?

pdf2ps yourfile.pdf | grep -c "%%Page:"

hth

Jerome Alet