From cups Sun Jun 15 14:12:05 2008 From: Kurt Pfeifle Date: Sun, 15 Jun 2008 14:12:05 +0000 To: cups Subject: Re: [cups.general] Alternative way to find no. of pages inside PDF? Message-Id: <32936-cups.general () news ! easysw ! com> X-MARC-Message: https://marc.info/?l=cups&m=121357254427363 Jerome Alet wrote: > On Sat, Jun 14, 2008 at 07:21:08AM -0700, Kurt Pfeifle wrote: >> I know I can use pdfinfo from the xpdf package like this >> >> pdfinfo some.pdf|grep Pages:|awk '{print $2}' >> >> in order to find out how many pages are in a given PDF, and get >> the result very fast. But what if I do not have a "pdfinfo" utility >> available (Ghostscript is available...) >> >> Does anybody of you know a different (fast enough) method to know >> the number of pages inside a PDF? >> >> ... >> Which other way than running the above command, grepping for that >> line and awk-printing the final number (which is 4-5 times slower >> than using pdfinfo) can you think of? >> > > What about using pkpgcounter from www.pykota.com ? Unfortunately this is ruled out... (for the same reason xpdf/pdfinfo cannot be used: space limitations on an old Solaris box; also, AFAIU, pkpgcounter would require a nearly full-blown installation of a rather current Python package). -- Kurt Pfeifle System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS _______________________________________________ cups mailing list cups@easysw.com http://lists.easysw.com/mailman/listinfo/cups