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

Regression NPE in Splitter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.0.31, 3.0.2 PDFBox
    • 2.0.32, 3.0.3 PDFBox, 4.0.0
    • Utilities
    • None

    Description

      The attached pdf used to work with Splitter in release 3.0.0, 3.01 however breaks in 3.0.2.

      Cannot invoke "org.apache.pdfbox.pdmodel.PDPage.getCOSObject()" because the return value of "org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDPageDestination.getPage()" is null

      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)

       

      Have attached the pdf and a test class. 

      It fails if we split on page count =1 or count = 10.

      Attachments

        1. PdfBoxSplitterTest.java
          1 kB
          Mohan H
        2. PDFBOX-5792-240045.pdf
          43 kB
          Tilman Hausherr

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              mohanh Mohan H
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: