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

NullPointerException in PDFStreamEngine.processSoftMask() when running ExtractImages

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.11
    • Fix Version/s: 2.0.13, 3.0.0 PDFBox
    • Component/s: Utilities
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: