Author: tilman
Date: Wed Apr 16 08:10:03 2025
New Revision: 1925106

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

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

Modified: 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: 
http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1925106&r1=1925105&r2=1925106&view=diff
==============================================================================
--- 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
 (original)
+++ 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
 Wed Apr 16 08:10:03 2025
@@ -66,6 +66,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.
@@ -201,6 +202,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
         {
             processTransparencyGroup(group);


Reply via email to