2 Replies Latest reply on May 20, 2010 12:35 PM by BKD2012

    Links of Bookmarks

    BKD2012

      Hi,

       

      I would like to add a link to a bookmark to its page programatically.

       

      There are 2 ways to go to a page of a bookmark clicking the bookmark.

       

      If I go to bookmark properties I can see the actions, go to a page in the document by page number or a named location.

       

      I can create a bookmark and name it and I can set the setAction, I can use an own script.

       

      I was looking for a way to add a named location to a bookmark but there isn't any property to do it programatically.

      I can use the method gotoNamedDest but I don't know how to set the named location to a page.

      An example

      // Open a new document
      var myNovelDoc = app.openDoc("/c/fiction/myNovel.pdf");
      // Go to a destination in this new doc
      myNovelDoc.gotoNamedDest("chapter5");
      // Close the old document
      this.closeDoc();

       

      I saw that I can use openDoc but it is for external documents that disclosed property is set to true and are needed security privileges.

       

      I can add a setPageLabels to a page but I dont know how to go to this  page when the bookmark is clicked, programatically.

      I would like to know to do it with a  command to follow the pagelabel when I click a bookmark if is posible.

       

      Sure there is way to do it easily, without security privileges.
      Any example?

       

      Thanks