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

Splitter throws NullPointerException when splitting certain PDFs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 2.0.31
    • None
    • Utilities
    • None

    Description

      Starting with version 2.0.31 (version 2.0.30 is not affected) some PDFs result in the following exception to be thrown:

      java.lang.NullPointerException: Cannot invoke "org.apache.pdfbox.pdmodel.PDPage.getCOSObject()" because the return value of "org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDPageDestination.getPage()" is null
              at org.apache.pdfbox.multipdf.Splitter.fixDestinations(Splitter.java:153)
              at org.apache.pdfbox.multipdf.Splitter.split(Splitter.java:136)
              at ...

      For instance it happens with the following PDF file: https://ptgmedia.pearsoncmg.com/images/9780132350884/samplepages/9780132350884.pdf

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asger-princh Asger Hautop Drewsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: