I have the same problem with index outside the bounds... 

I was converting following PDF =>

http://zbierka.sk/ov/kapitoly/default.aspx?KapitolaID=64396&FileName=ov2012-018-01&Rocnik=2012&TypKapitolyID=1
http://zbierka.sk/ov/kapitoly/default.aspx?KapitolaID=64396&FileName=ov2012-018-01&Rocnik=2012&TypKapitolyID=1
 

I have downloaded your source code... 

And FIRST ERROR was in the CMapAwareDocumentFont.GetWidth(int char1)
- input was 327 (representing slovak character Ň), which was transformed by

char1 = uni2cid[char1];

into 277, but after accessing by widths[char1] it gave me the error, because
variable widths was initialized with 256 items... I had to increase size of
that variable to avoid this mistake... 

SECOND ERROR was in LocationTextExtractionStrategy.GetResultantText()

where following condition was missing =>
!string.IsNullOrEmpty(lastChunk.text)
in this condition 
else if (dist > chunk.charSpaceWidth / 2.0f && chunk.text[0] != ' ' &&
lastChunk.text[lastChunk.text.Length - 1] != ' ')
                            sb.Append(' ');

After repairing these errors and building dll, conversion worked
perfectly... Will you be so kind to take a look at our slovak diacritic and
also repair in your official release ? If you already did it, just ignore my
message... Thanks a lot... 

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Possible-bug-in-PdfTextExtractor-GetTextFromPage-iTextSharp-tp4342445p4357522.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
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

Reply via email to