From: Luis Bernardo Date: Sat, 16 Mar 2013 17:54:54 +0000 (+0000) Subject: FOP-2216: PDF forms are offset; patch submitted by Simon Steiner X-Git-Tag: fop-2_0~216 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=92a5ef654877571635164b70e5c211e9dc0cc740;p=xmlgraphics-fop.git FOP-2216: PDF forms are offset; patch submitted by Simon Steiner git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1457282 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java b/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java index 6235ceda9..dde6b0ef3 100644 --- a/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java +++ b/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java @@ -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");