i havnt looked at the source code for much of PDFLib so I dont know how they implement obtaining info on a document, but the way pdf's are written is so you can essentially load thousands of pdf pages with limited memory. they are complicated documents with tree structures and roots containing information. a header in a pdf will contain a bunch of information on the document, including the number of pages, however page size isnt included. you may be best to stick with pdflib or the similar but free, fpdf unless you want to write a potentially complex app in php to open the document and parse the binary data down. the acrobat 1.6 spec itself is 1216 pages, of course it contains everything, and you are only looking for two pieces of info. just some thoughts though.