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

Regression NPE in Splitter

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • 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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment