Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.11
-
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.