kc2scy, kc2scy wrote > I’m checking the location of every image until I get the one in the > location of the barcode. This just seems a long way to do it.
There essentially is no better way to do that. It is possible to put that location checking code into a RenderFilter similar to the RegionTextRenderFilter but that only separates the test from the scanning. A remark on the side, though, you use '==' comparisons for float/double values when checking the coordinates. Those floating point numbers are results of calculations (matrix multiplications etc) and due to the inaccurateness of float arithmetics, therefore, may be a little bit off. I would propose allowing a small difference. Regards, Michael -- View this message in context: http://itext-general.2136553.n4.nabble.com/Get-image-by-location-tp4660544p4660547.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ 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