5 Replies Latest reply on Nov 23, 2009 9:46 AM by pr101

    Using Javascript to Extract Acrobat Open Api parameters

    pr101
      I am trying to use the Acrobat Open Api in order to more specifically navigate to pdf locations.
      The pdf open api however is silent on how to acquire the parameters needed for the URL.

      Specifically:
      The acrobat open api provides several examples of urls to open pdfs in different ways.
      I am trying to use is:
      http://example.org/doc.pdf#page=3&zoom=200,250,100

      1) page is easy - in the doc it is there and it can be found via this.pageNum

      2) zoom is also easy - in the doc it is there and it can be found via this.zoom

      The other two parameters are hard to find.
      My closest guess is to use this.viewState.
      However extracting the fields of this object has been impossible to me.
      I see that this.viewState.toSource() will output the contents,
      but are these the correct contents I need for the two other zoom parameters.

      I also recognized I can use the this.bookmarkRoot object.
      However I could not find fields in its children which give the
      page, zoom, scale and offset parameters.

      Any help would be appreciated.
      Thanks for your time.