javascriptacrobat

Using Acrobat Javascript to navigate from one page to another page with zoom to an X, Y coordinate on that page


Using Acrobat Javascript to navigate from one page to another page with zoom to an X, Y coordinate on that page

I want to try to add a pagelink using acrobat javascript. when the page link is clicked it should navigate to another page on the same document with a zoom to a target X,Y page coordinate.

Page link should have the "Acrobat javascript" code which on click should go the other page X, Y coordinates


Solution

  • The code would be something like this...

    this.zoom = 200; //200% zoom
    this.pageNum = 1; //Page 2, PDF page numbers are zero based 
    this.scroll(72, 72); // the coordinates to zoom to. 72 points per inch with the origin in the lower left