Richard Michael wrote: > System.out.println doc.getPageSize(): > Rectangle: 612.0x792.0 (rot: 0 degrees) > > System.out.println doc.getPageRotation(): > 90
And System.out.println doc.getPageSizeWithRotation(): Rectangle: 612.0x792.0 (rot: 90 degrees) > Why doesn't getPageSize indicate the page is rotated? Because that method has a different purpose than the getPageSizeWithRotation method. > Would it be possible to have equals() or the comparable interface in > PageSize? Yes, but no. It's possible, but it wouldn't help you: I would compare the llx, lly, urx, ury and rotation (and you probably want LETTER portrait and LETTER landscape) to be equals, but I would also have to compare background colors, borders,... Also, I don't see the point of such a method, as the concept of a page in LETTER format or in A4 format doesn't exist in PDF. Pages are defined by their page boundaries. These are PDF arrays with 4 values. A page with defined by [0, 0, x, y] has the same height and width of a page defined like this [-x, -y, 0, 0] or [-x/2, -y/2, x/2, y/2]. It's better that you write your own code so that you know which page sizes are equals according to your requirements, because not every page that is equal to you, will be equal to me. 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/