diff options
author | Jordan Naftolin <jordan@apache.org> | 2000-06-28 17:49:20 +0000 |
---|---|---|
committer | Jordan Naftolin <jordan@apache.org> | 2000-06-28 17:49:20 +0000 |
commit | 91fac2e0e2f5e65d708ce24cfc1c04485fa6e184 (patch) | |
tree | ca006c0f1e2763b2f44a0b7ff13e44af18f0d52e /src | |
parent | 4b679528b1d5622698b13291a8d8acfb31170d26 (diff) | |
download | xmlgraphics-fop-91fac2e0e2f5e65d708ce24cfc1c04485fa6e184.tar.gz xmlgraphics-fop-91fac2e0e2f5e65d708ce24cfc1c04485fa6e184.zip |
Does not alter zoom, and positions page based on x,y coordinates
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193443 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/org/apache/fop/pdf/PDFGoTo.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/org/apache/fop/pdf/PDFGoTo.java b/src/org/apache/fop/pdf/PDFGoTo.java index 7dc9c9c86..0a8c1aae3 100644 --- a/src/org/apache/fop/pdf/PDFGoTo.java +++ b/src/org/apache/fop/pdf/PDFGoTo.java @@ -59,7 +59,9 @@ public class PDFGoTo extends PDFObject { /** the pageReference */ protected String pageReference; - protected float yPosition=0; + protected float + xPosition=0, + yPosition=0; /** * create a /GoTo object. @@ -89,12 +91,29 @@ public class PDFGoTo extends PDFObject { + /** + * Sets the Y position to jump to + * + * @param yPosition y position + */ public void setYPosition(int yPosition) { this.yPosition = (yPosition/1000f); } + + /** + * Sets the x Position to jump to + * + * @param xPosition x position + */ + public void setXPosition(int xPosition) + { + this.xPosition = (xPosition/1000f); + } + + /** * represent the object in PDF * @@ -103,7 +122,7 @@ public class PDFGoTo extends PDFObject { public String toPDF() { String p = new String(this.number + " " + this.generation + " obj\n<<\n/S /GoTo\n" + - "/D [" + this.pageReference + " /FitH "+yPosition+"]\n" + + "/D [" + this.pageReference + " /XYZ "+xPosition+" "+yPosition+" null]\n" + ">>\nendobj\n"); return p; } |