Hi, I have implemented ITextExtractionStrategy in to get the X,Y location of all text chunks on the page and then draw them to a bitmap, but it looks like iTextSharp is reporting incorrect X co-ordinate for some of the text chunks. The attached C# 4.0 project demonstrates it (link below). As you will see, this code is very similar to how LocationTextExtractionStrategy works. In fact I have copied some of the code from that class. Now the problem is that some of the text chunks are drawn in wrong positions when I run it.
Please see the output of the attached project by running it. It tries to extract text chunks from page 14 and draws them onto a bitmap. See that some of these text chunks appear to the left of their actual positions. Interestingly all of these happen to be in the 3rd column. For example the string "MA" that appears in 2nd row, 3rd column was actually in the 4th column as you'll see when you open the PDF file with Acrobat. Similarly, the text "Bio" that appears in 4th row, 3rd column was also part of the 4th column. I have dug it a little and it looks like the Tj operator is not being handled correctly by PdfContentStreamProcessor. But I'm not too sure about that. It could be something on my part too. C# Project Link: http://www.4shared.com/get/6w2SUo0q/TjTest.html Best, Shujaat ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ iText-questions mailing list [email protected] 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
