]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Does not alter zoom, and positions page based on x,y coordinates
authorJordan Naftolin <jordan@apache.org>
Wed, 28 Jun 2000 17:49:20 +0000 (17:49 +0000)
committerJordan Naftolin <jordan@apache.org>
Wed, 28 Jun 2000 17:49:20 +0000 (17:49 +0000)
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

index 7dc9c9c869f4b9924d677bc9ecbcf9098c461172..0a8c1aae3ca341a81be547b9c984953e0a75eb1a 100644 (file)
@@ -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;
     }