Author: tilman
Date: Wed Sep 9 19:02:29 2026
New Revision: 1938059
Log:
PDFBOX-5250: include the group matrix in the initial matrix, by Valery Bokov
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
==============================================================================
---
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Wed Sep 9 19:02:26 2026 (r1938058)
+++
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Wed Sep 9 19:02:29 2026 (r1938059)
@@ -239,11 +239,11 @@ public abstract class PDFStreamEngine
Matrix parentMatrix = initialMatrix;
PDGraphicsState graphicsState = getGraphicsState();
- // the stream's initial matrix includes the parent CTM, e.g. this
allows a scaled form
- initialMatrix = graphicsState.getCurrentTransformationMatrix().clone();
-
// transform the CTM using the stream's matrix
graphicsState.getCurrentTransformationMatrix().concatenate(group.getMatrix());
+
+ // the stream's initial matrix includes the parent CTM, e.g. this
allows a scaled form
+ initialMatrix = graphicsState.getCurrentTransformationMatrix().clone();
// Before execution of the transparency group XObject’s content
stream,
// the current blend mode in the graphics state shall be initialized
to Normal,