]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2216: PDF forms are offset; patch submitted by Simon Steiner
authorLuis Bernardo <lbernardo@apache.org>
Sat, 16 Mar 2013 17:54:54 +0000 (17:54 +0000)
committerLuis Bernardo <lbernardo@apache.org>
Sat, 16 Mar 2013 17:54:54 +0000 (17:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1457282 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/pdf/PDFContentGenerator.java

index 6235ceda9de375270a74c3a7b844a3049047b69a..dde6b0ef3c76cf6307dff1b6077a97995c460840 100644 (file)
@@ -61,6 +61,7 @@ public class PDFContentGenerator {
 
     private boolean inMarkedContentSequence;
     private boolean inArtifactMode;
+    private AffineTransform transform;
 
     /**
      * Main constructor. Creates a new PDF stream and additional helper classes for text painting
@@ -89,6 +90,10 @@ public class PDFContentGenerator {
         this.colorHandler = new PDFColorHandler(document.getResources());
     }
 
+    public AffineTransform getAffineTransform() {
+        return transform;
+    }
+
     /**
      * Returns the applicable resource context for the generator.
      * @return the resource context
@@ -303,6 +308,7 @@ public class PDFContentGenerator {
      * @param transform the transformation matrix (in points)
      */
     public void concatenate(AffineTransform transform) {
+        this.transform = transform;
         if (!transform.isIdentity()) {
             currentState.concatenate(transform);
             currentStream.add(CTMHelper.toPDFString(transform, false) + " cm\n");