0 Replies Latest reply on Aug 20, 2013 4:32 PM by sriscript

    Index Page number linking

    sriscript

      Hi

       

      I am beginner of script plese help me creating a script for index page nymber linking,

       

      wheen i create a pdf an index page number create with page link. If i clink the page number in pdf it will go to containing page. i have insert some commend for your reference. these reference create a page ling but did not go to containing page please correct my script needfuly.

       

      var myDoc = app.activeDocument;
      app.findTextPreferences = null;
      app.changeTextPreferences = null;
      app.findTextPreferences.findWhat = "^9";
      var myLinks = myDoc.findText();
      var myPage = myLinks;

      for (i = 0; i < myLinks.length; i++){
         myLink = myLinks[i];
         mySource = myDoc.hyperlinkTextSources.add(myLink);
         myDestination = myDoc.hyperlinkPageDestinations.add(myPage + myLink.contents);
         myDestination.destinationPageIndex = eval(myLink);
         myDoc.hyperlinks.add(mySource, myDestination);
      }

       

       

      Thaks

       

      and waiting for yor rly.....................