Skip to main content
Participant
December 5, 2016
Question

open links in new browser window or tab?

  • December 5, 2016
  • 1 reply
  • 461 views

Hello - I've been researching this and find the recommendation to add/edit the Javascript action
app.launchURL("http://www.mycompany.com/hyperlinkURL.com", true);

BUT - how & where do I add this to my PDF??    Which Tool do I use?  Can someone point me to step-by-step instructions?

I use Adobe Acrobat and can't figure out how to edit my PDF urls to add the javascript so when the PDF is viewed in the browser and the user clicks on a hyperlink within the PDF, that the link opens in a new tab or window.


thank you -

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
December 5, 2016

- Select the "Add or Edit Link" tool

- Draw the box of the link you want to create

- In the window that opens select its display properties and as its Action select "Custom link", and click Next

- Under the Link Properties window, switch to Actions and add a "Run a JavaScript" action.

- Paste the code into the window that opens and then click OK, and OK, and you're done.

ibmeAuthor
Participant
December 5, 2016

Thanks for your detailed response.  I did exactly as written, saved the file, opened it in the browser and it didn't work. 

The first time I clicked the link, it opened in the same window. 

The second time I clicked the link, the link was dead.

I see many people writing about this, but I can't get it to work

try67
Community Expert
Community Expert
December 5, 2016

Most browsers use their own PDF plugins now, and many of them are sub-standard, especially when it comes to things like form fields, links and scripts. The only way to be certain it will work is to open the file using Adobe Acrobat or Adobe Reader.