Author: tilman
Date: Wed Sep  9 19:02:26 2026
New Revision: 1938058

Log:
PDFBOX-5250: include the group matrix in the initial matrix, by Valery Bokov

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
==============================================================================
--- 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
       Wed Sep  9 19:02:22 2026        (r1938057)
+++ 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
       Wed Sep  9 19:02:26 2026        (r1938058)
@@ -238,11 +238,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, 

Reply via email to