You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2025/04/16 08:09:59 UTC

svn commit: r1925105 - /pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java

Author: tilman
Date: Wed Apr 16 08:09:59 2025
New Revision: 1925105

URL: http://svn.apache.org/viewvc?rev=1925105&view=rev
Log:
PDFBOX-5989: more initialization of softmask processing

Modified:
    pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java

Modified: pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1925105&r1=1925104&r2=1925105&view=diff
==============================================================================
--- pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java (original)
+++ pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java Wed Apr 16 08:09:59 2025
@@ -67,6 +67,7 @@ import org.apache.pdfbox.contentstream.o
 import org.apache.pdfbox.contentstream.operator.OperatorName;
 import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
 import org.apache.pdfbox.pdmodel.graphics.blend.BlendMode;
+import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray;
 
 /**
  * Processes a PDF content stream and executes certain operations.
@@ -202,6 +203,10 @@ public abstract class PDFStreamEngine
         getGraphicsState().setCurrentTransformationMatrix(softMaskCTM);
         getGraphicsState().setTextMatrix(new Matrix());
         getGraphicsState().setTextLineMatrix(new Matrix());
+        getGraphicsState().setNonStrokingColorSpace(PDDeviceGray.INSTANCE);
+        getGraphicsState().setNonStrokingColor(PDDeviceGray.INSTANCE.getInitialColor());
+        getGraphicsState().setStrokingColorSpace(PDDeviceGray.INSTANCE);
+        getGraphicsState().setStrokingColor(PDDeviceGray.INSTANCE.getInitialColor());
 
         try
         {