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

NullPointerException in PDFStreamEngine.processSoftMask() when running ExtractImages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.11
    • 2.0.13, 3.0.0 PDFBox
    • Utilities
    • None

    Description

      Exception in thread "main" java.lang.NullPointerException
              at org.apache.pdfbox.contentstream.PDFStreamEngine.processSoftMask(PDFStreamEngine.java:201)
              at org.apache.pdfbox.tools.ExtractImages$ImageGraphicsEngine.run(ExtractImages.java:207)
              at org.apache.pdfbox.tools.ExtractImages.extract(ExtractImages.java:182)
              at org.apache.pdfbox.tools.ExtractImages.run(ExtractImages.java:145)
              at org.apache.pdfbox.tools.ExtractImages.main(ExtractImages.java:90)
              at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:62)

      The cause is that the ExtGState containing the softmask isn't assigned to the graphics state. Just assigning the softmask isn't enough (another NPE occurs) because the initial CTM (needed by a clone()) is only set when using copyIntoGraphicsState.

      Attachments

        1. 000163-p2.pdf
          168 kB
          Tilman Hausherr

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: