Author: tilman
Date: Wed Apr 16 08:10:07 2025
New Revision: 1925107
URL: http://svn.apache.org/viewvc?rev=1925107&view=rev
Log:
PDFBOX-5989: more initialization of softmask processing
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL:
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1925107&r1=1925106&r2=1925107&view=diff
==============================================================================
---
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
(original)
+++
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Wed Apr 16 08:10:07 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
{