Thank you very much for the tip. It works. pdfinfo returns total pages as well as the dimension of the first page/selected page/page ranges. This helps me in avoiding the parsing of whole output stream, as string parsing/comparison is very expensive and after incorporation of this is a boost in performance for large pdf's.
Regards, Tariq On Thu, Dec 24, 2009 at 4:17 PM, German Geek <[email protected]> wrote: > Have you tried pdfinfo? i think it might be part of another package called > xpdf though ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.zip ). > > Merry xmas! > ++Tim Hinnerk Heuer++ > > http://www.ihostnz.com > > > 2009/12/24 Tariq Zubairy <[email protected]> > > Hi, >> I need to get the total number of pages, max width and max height of PDF >> file. At the moment I am using *"PDF2SWF -I abc.pdf"* command for getting >> the page information. This commands returns information of all pages in >> multiple lines. Then I have to parse each line (string comparison i.e. very >> expensive in terms of large file) to get width and height of each page and >> calculate maximum width/height. >> >> Is there any way to pass some parameters to get *total pages, max width, >> max height *through *PDF2SWF -I ? >> >> *Regards, >> Tariq >> >> >> >
