Thank you very much. That's the correct explanation. There was a CropBox smaller than the media box. Once set the CropBox equal to the mediabox size, for example, then everything's ok.
Thank you again! Massimo -----Messaggio originale----- Da: 1T3XT BVBA [mailto:i...@1t3xt.info] Inviato: 27 July 2011 08:14 A: Post all your questions about iText here Oggetto: Re: [iText-questions] Problems detecting page sizes of PDF documents On 26/07/2011 16:26, Bassini Massimo wrote: > the resulting document still has the same problem: looks like an A4 > within code, but it's something else, though. In addition to Mark's answer (which is correct), I'd like to add that apart from the /MediaBox (a rectangle returned by getPageSize()), you may also want to look for the /CropBox. Suppose that the /MediaBox tells you the page size is A4; Adobe Reader will give a smaller size if a smaller /CropBox was defined for the page. ------------------------------------------------------------------------ ------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php