From 91fac2e0e2f5e65d708ce24cfc1c04485fa6e184 Mon Sep 17 00:00:00 2001 From: Jordan Naftolin Date: Wed, 28 Jun 2000 17:49:20 +0000 Subject: 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 --- src/org/apache/fop/pdf/PDFGoTo.java | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3