Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Ensuring PDF hyperlinks open in a new tab or window in ALL browsers

New Here ,
Feb 27, 2020 Feb 27, 2020

Copy link to clipboard

Copied

Hello. I previously posted this in InDesign support but now it's for Acrobat. I followed the advice below (thanks senrab75to ensure my PDF links – when open in a browser – open in a new tab/window. This worked beautifully in Firefox but not in Chrome or Safari – same for most. According to Windows users, it worked in IE. Any advice?

Also, it's ok to do the below in a small document but – as a lot of people noted in the previous chat – when it's a large document with multiple links, it is tedious. Would be great if Adobe developers could add this feature to all their design programmes when creating hyperlinks...

Thank you. 

 

From senrab75 :

In Adobe Acrobat (the application, not the .pdf reader) use the Link Tool to edit the hyperlinked text object. Remove the “Open a web link” action assigned by default to handle the hyperlinked text when clicked. Assign a new action to the linked text that will open the hyperlink in a new window.

Note: The links have to be established each time you create a PDF – they do not carry over from In Design or any other software.

  1.      Access the Link tool (Tools > Advanced Editing > Link Tool)
  2.      Right click on the hyperlinked text and select Properties
  3.      In the Link Properties dialog box click on the Actions tab
  4.      In the middle of the Actions panel in the Actions section click on the Open a web link action listed there to select it.
  5.      Click the Delete button located just below that section in the lower right corner. This removes the action from the list and the Actions section should now be empty.
  6.      In the Add an Action section right above the Actions section click on the Select Action drop down menu and select the Run a JavaScript action from the list.
  7.      Click the Add… button.
  8.      In the JavaScript Editor that opens up, click your cursor in the Create and Edit JavaScripts area, like you would in a word processor to begin typing, and type the following line:

app.launchURL("http://www.MySampleURL.com/someFolder/somePage.html", true);

  1.      Change the hyperlink text between the quotation marks to your desired URL.

Ex: app.launchURL("http://www.cnn.com", true);

Caution:

  1.      The code is case sensitive so make sure you typed app.launchURL NOT app.launchurl or some other case combination.
  2.      Make sure that you have quotation marks around your hyperlink URL.
  3.      Make sure there is a semicolon at the end of the line of code you just typed.
  4.      Make sure that the quotation marks are straight up and down – not on an angle.
  5. Click OK to close the JavaScript Editor dialog box.
  6. Click OK to close the Link Properties dialog box.
  7. Save the .pdf and test your .pdf hyperlink by opening the .pdf document in a browser, click the link and check to see that it opens in a new browser window.
TOPICS
Edit and convert PDFs, How to

Views

34.1K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 28, 2020 Feb 28, 2020

Copy link to clipboard

Copied

No, because you can't control which PDF plugin will be used to open the file and whether or not it will execute this code correctly (or at all). If you find a plugin that doesn't work correctly, complain to its developers.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2020 Aug 16, 2020

Copy link to clipboard

Copied

Not working for me in chrome not in edge.
When I add the JS the link works from Acrobat, but does not work at all in the browsers, unclickable.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

Same here

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

It does work in Firefox BTW

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 22, 2020 Sep 22, 2020

Copy link to clipboard

Copied

I tried this a few months back and it worked perfectly. But for some strange reasons when I do it again this time the links are not working when I view the PDF online. Any idea how to fix this?

Thanks

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 22, 2020 Sep 22, 2020

Copy link to clipboard

Copied

The makers of each browser constantly change the PDF viewers. They do not tell anyone or keep a compatibility chart. Expect constant random change.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

This instruction didn't work for me at all, link is still opening up in the same web browser page, I'm on PC so I still have to do Ctrl + click to open the link to a separate web browser page. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 15, 2021 Jan 15, 2021

Copy link to clipboard

Copied

The link works but still opens in the same tab in Chrome, rather than a new window or tab.

 

Any Suggestions?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 15, 2021 Jan 15, 2021

Copy link to clipboard

Copied

Report this issue to the developers of Chrome.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2021 Mar 01, 2021

Copy link to clipboard

Copied

It is imperative that the link is javaScripted as app.launchURL("http://www.MySampleURL.com/someFolder/somePage.html", true);

Note the true value. See: https://www.amyuni.com/WebHelp/JavaScript_SDK/app/Methods/app_launchURL.htm

 

If problem still occurs consider that the browser(s) may not be updated to the most current version.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 01, 2021 Mar 01, 2021

Copy link to clipboard

Copied

This will NOT work in all browsers, even if you use the latest versions.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 20, 2021 Jul 20, 2021

Copy link to clipboard

Copied

Ok, I don't understand what the solution is then. Can you help? Is there a javascript that will work to open a link in another tap or window in Chrome, Safari and Firefox?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 20, 2021 Jul 20, 2021

Copy link to clipboard

Copied

@try67 Q is for you!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 20, 2021 Jul 20, 2021

Copy link to clipboard

Copied

LATEST

See TSN's reply below. Basically, there is no global solution for this.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 20, 2021 Jul 20, 2021

Copy link to clipboard

Copied

1. There is no solution.

2. Accept that interactive PDF is wildly random, and don't expect it to work unless you can control the systems and apps in use.

3. If you still want a solution, see step 1.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines