index out of bounds exception
-----------------------------
Key: PDFBOX-467
URL: https://issues.apache.org/jira/browse/PDFBOX-467
Project: PDFBox
Issue Type: Bug
Affects Versions: 0.8.0-incubator
Reporter: Sean Bridges
this is with svn revision 773978
I get this error with several pdf files,
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: 0
at java.lang.String.charAt(String.java:687)
at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(PDFParser.java:281)
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:156)
... 3 more
I can't give you the pdf file, but changing PDFParser line 281 to,
if (header.length() > 0 && Character.isDigit (header.charAt(0)))
fixes it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.