Hi! I'm working with PoDoFo revision 1601. With the enclosed Pdf I've got the problem, that the cropBox is not properly read. This is a small test: PdfMemDocument subDoc( "TextWithCrop.pdf" ); PdfRect rect; rect = subDoc.GetPage(0)->GetMediaBox(); TRACE( "media %.2f %.2f %.2f %.2f\n", rect.GetLeft(), rect.GetBottom(), rect.GetWidth(), rect.GetHeight() ); rect = subDoc.GetPage(0)->GetCropBox(); TRACE( "crop %.2f %.2f %.2f %.2f\n", rect.GetLeft(), rect.GetBottom(), rect.GetWidth(), rect.GetHeight() );
This results in: media 0,00 0,00 2097,64 785,20 crop 0,00 0,00 2097,64 785,20 while the correct result should be: media 0,00 0,00 2097,64 785,20 crop 53,26 327,69 1968,56 279,27 The Pdf itself seems to be OK, no complaints from Acrobat Preflight or Ghostscript. If I remove the line HasLinearizationDict(); in PdfParser::ReadDocumentStructure() everything works out fine. I had removed this line in 2009-09-08 due to problems with linearization and xrefs. With revision 1580 2014-01-05 this line was reenabled by Libor Kone (probably as a prerequisite for digital signing with incremental updates). Same with revision 1657. A hex dump shows that the Pdf contains CropBox twice (offset 0x37e and offset 0x446c). I have no real idea what goes on, it seems to not read the last trailer/xref Thanks in Advance Uli
TextWithCrop.pdf
Description: Adobe PDF document
------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users