Skip to content

Commit 0cf58be

Browse files
committed
PDFBOX-5989: more initialization of softmask processing
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1925107 13f79535-47bb-0310-9956-ffa450edef68
1 parent 78711fc commit 0cf58be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
import org.apache.pdfbox.contentstream.operator.OperatorName;
6868
import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
6969
import org.apache.pdfbox.pdmodel.graphics.blend.BlendMode;
70+
import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray;
7071

7172
/**
7273
* Processes a PDF content stream and executes certain operations.
@@ -202,6 +203,10 @@ protected void processSoftMask(PDTransparencyGroup group) throws IOException
202203
getGraphicsState().setCurrentTransformationMatrix(softMaskCTM);
203204
getGraphicsState().setTextMatrix(new Matrix());
204205
getGraphicsState().setTextLineMatrix(new Matrix());
206+
getGraphicsState().setNonStrokingColorSpace(PDDeviceGray.INSTANCE);
207+
getGraphicsState().setNonStrokingColor(PDDeviceGray.INSTANCE.getInitialColor());
208+
getGraphicsState().setStrokingColorSpace(PDDeviceGray.INSTANCE);
209+
getGraphicsState().setStrokingColor(PDDeviceGray.INSTANCE.getInitialColor());
205210

206211
try
207212
{

0 commit comments

Comments
 (0)