Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
10

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

New Here ,
Feb 27, 2020 Feb 27, 2020

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
214.4K
Translate
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 ,
Apr 01, 2024 Apr 01, 2024
LATEST

Works from OneDrive too.

Translate
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