[ https://issues.apache.org/jira/browse/PDFBOX-3538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15596224#comment-15596224 ]
Tilman Hausherr commented on PDFBOX-3538: ----------------------------------------- The xref table has this {code} 0000000-21 00000 n {code} replacing the "-" with "0" makes it a correct PDF. The alternative would be to rebuild the xref table, the thing we did for files that were cut off. > IOException over NumberFormatException on a valid PDF > ----------------------------------------------------- > > Key: PDFBOX-3538 > URL: https://issues.apache.org/jira/browse/PDFBOX-3538 > Project: PDFBox > Issue Type: Bug > Components: Parsing > Environment: Windows 7 x64, JVM 1.8.0_101 > Reporter: Seva Alekseyev > Attachments: PB_AGAP001539_Graphical.pdf > > > On the attached document, which loads and displays with Adobe Reader fine, > PDDocument.load() throws the following exception: > java.io.IOException: java.lang.NumberFormatException: For input string: > "0000000-21" > at > org.apache.pdfbox.pdfparser.COSParser.parseXrefTable(COSParser.java:2017) > at org.apache.pdfbox.pdfparser.COSParser.parseXref(COSParser.java:224) > at > org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:194) > at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:252) > at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:957) > at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:913) > at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:861) > at Temp.PDFTemp.App.main(App.java:19) > Caused by: java.lang.NumberFormatException: For input string: "0000000-21" > at > java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) > at java.lang.Long.parseLong(Long.java:589) > at java.lang.Long.parseLong(Long.java:631) > at > org.apache.pdfbox.pdfparser.COSParser.parseXrefTable(COSParser.java:2010) > ... 7 more -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org