Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
2.0.18
-
None
-
Windows 10
Java Version 1.8.0_241
Description
I have this code:
PDDocument pdDoc = PDDocument.load(file);
PDFTextStripper stripper = new PDFLayoutTextStripper();
string = stripper.getText(pdDoc);
In some PDF documents when execute de getText() method I get this error:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.charAt(String.java:658)
at com.sagedillepasa.gestion.TextLine.isSpaceCharacterAtIndex(PDFLayoutTextStripper.java:269)