Gian, giansluca wrote > i'm trying to extract some images from a pdf file implementing > RenderListener interface. > all works well but some images that i get are upside-down. inside a pdf i > can see the same images correct .. > > i would ask if there is a way to know if image that i getting is rotated > (maybe when pdf was created) before writing it on a disc, so as i can > apply an opposite rotation and write it ...
The ImageRenderInfo instance you get in RenderListener.renderImage provides the coordinate transformation matrix active at the time of image rendering. This matrix shows you how the image is rendered. Beware, though, the matrix can contain other operations than mere rotations by multiples of 90°, it can rotate by other angles, it can skew, stretch, mirror, ... Additionally you have to consider the page rotation which you can get from the PdfReader. This rotation value fortunately is a multiple of 90°. Regards, Michael -- View this message in context: http://itext-general.2136553.n4.nabble.com/image-extracted-from-pdf-file-is-180-degree-rotated-upside-down-tp4660037p4660041.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ 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