3 Replies Latest reply on Nov 17, 2014 1:11 AM by try67

    Adding custom arguments to links


      This might be an easy question, but we can't find  a way for now.

      We need to create a script or plug-in that makes it easy for users to enter/edit links using a specific syntax.  This syntax is used on a pdf reader we have developed on iOS, Android, and Windows 8.


      Here is a simple example of how our pdf reader works on mobile devices:


      We do not need to reproduce this behaviour in Acrobat, but we need to make it simple for users to enter links using our syntax. So, in the example above, after entering a link to http://www.google.com using Acrobat's regular link editing tool, the user would be presented a check button where they would choose either "Open Link In Full Screen" or "Open Link Inside Pdf". When the user has made a choice, the link would be changed to either http://www.google.com/warect=full or http://www.google.com/warect=self.


      We are not sure: is it possible to develop such an interface using javascript?


      For example, is it possible to create a contextual menu which can be opened when right clicking on a link on Acrobat?

        • 1. Re: Adding custom arguments to links
          try67 MVP & Adobe Community Professional

          No, you can't do it using JavaScript. I mean, you can create the interface but you can't hook it up to the Link Tool. Nor can you assign an "open a web-page" command to a link using JS. You can only use it to assign "Execute a JavaScript" command.


          You can use JS, though, to create a pop-up menu that will open when a link is clicked.

          • 2. Re: Adding custom arguments to links
            Deepiks Level 1

            Thanks for your answer.


            What we are trying to achieve is not to reproduce in Acrobat the behavior of our own reader. What we need is a way to make it easy to enter links in Acrobat with our specific syntax.


            I understand it's not possible to create an interface hooked up to the link tool. Now, if the user selects a link previously created with the link tool, and then starts our script using a custom menu (or whatever), is it possible inside the script to detect the selected link? And is it possible to change the destination of this link?

            • 3. Re: Adding custom arguments to links
              try67 MVP & Adobe Community Professional

              The answer to both questions is no. It might be possible to do it using a plugin, though. You can ask over at the Acrobat SDK forum about that.