Richard Michael wrote: > Something such as.. > > PdfReader source = new PdfReader("test.pdf"); > if ( source.getPageSize(1).equals(PageSize.LETTER) ) { > (..do stuff..) > } > > Am I on the right track?
No, you aren't. You are assuming that class Rectangle has its own implementation of the equals() method, which it hasn't. And even if you were able to use the equals() method, then you would still have to check if by chance you have a page in the LETTER format, but rotated. I think the safest thing to do would be to compare the widths and heights (don't forget to deal with pages in portrait vs. landscape orientation). br, Bruno ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/