Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3538

IOException over NumberFormatException on a valid PDF

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.5, 3.0.0 PDFBox
    • Component/s: Parsing
    • Labels:
      None
    • Environment:
      Windows 7 x64, JVM 1.8.0_101

      Description

      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

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              sevaa Seva Alekseyev

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment