Alternative way to find no. of pages inside PDF?

James Cloos cloos at jhcloos.com
Tue Jun 17 00:37:14 PDT 2008


Actually, add -dQUIET to the command invocation to skip the copywrite
info and get just the number of pages on stdout:

  gs -dQUIET -dNODISPLAY -sPDFname=pdffilename pdfpagecount.ps

Also, I can only get it to work for PDF files in the current directory;
any slashes in the filename cause an /undefinedfilename error.  There
may be a switch to fix that....

-JimC
-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6




More information about the cups mailing list