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 senrab75) to 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.
app.launchURL("http://www.MySampleURL.com/someFolder/somePage.html", true);
Ex: app.launchURL("http://www.cnn.com", true);
Caution:
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.
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.
Copy link to clipboard
Copied
Same here
Copy link to clipboard
Copied
It does work in Firefox BTW
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
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.
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.
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?
Copy link to clipboard
Copied
Report this issue to the developers of Chrome.
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.
Copy link to clipboard
Copied
This will NOT work in all browsers, even if you use the latest versions.
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?
Copy link to clipboard
Copied
@try67 Q is for you!
Copy link to clipboard
Copied
See TSN's reply below. Basically, there is no global solution for this.
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.
Copy link to clipboard
Copied
Sigh. I just tried the above technique on the links in a PDF, but it doesn't work in either Edge or Chrome. 😞
It was worth a try. Thanks anyway.
Copy link to clipboard
Copied
I, also, have been trying to have a number of online videos that are linked to a pdf e-book, to open in a new window, but no success, even with this Java Script attempt. What if the pdf were converted to an html5? Could the video links then be set to open in a new window?
Copy link to clipboard
Copied
> What if the pdf were converted to an html5? Could the video links then be set to open in a new window?
Yes, when the browser support it.
Copy link to clipboard
Copied
So, are you saying that while with an online PDF with links to Vimeo or
Youtube videos are NOT able to be set up so that they open in a new window,
but by converting the entire pdf to html5 that those same links to videos
CAN be set up or programmed so that they DO open in a new window?
But, that the different way to "set up" the links in html versus setting up
the links in pdf, may or may not open the videos in a new window depending
on the browser (Chrome, Safari, Firefox, Edge, Internet Explorer, Bing,
etc) ??
--
Paul Gittelsohn
(personal info removed by mod)
Copy link to clipboard
Copied
As I said before
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.
This applies too to what browsers might do with HTML links. The concept of "open a new window" does not even exist in many browsers, for example Safari on iPhone, where there is only one "window".
Copy link to clipboard
Copied
Thank you or this info. Do you think it would be possible to make an Action to automatically convert all the links in a document from the standard link to the Javascript version? I've made small actions before, but this one is over my head.
Savin
Copy link to clipboard
Copied
This can't be done with an Action in Acrobat. It might be possible with plugin. It's certainly possible using a stand-alone tool, like this (paid-for) one I've developed that does just that: https://www.try67.com/tool/convert-all-links-in-a-pdf-to-open-in-new-window
Copy link to clipboard
Copied
hi Guys -
I have Index.pdf which has 10 hyperlinks to other pdf files ( A.pdf B.pdf C.pdf etc) in the same folder..
when i click the link for A.pdf - both Adobe Reader and Adobe Pro close the index.pdf and open A.pdf in its place.
I do not want index.pdf to be closed, but instead want A.pdf , B.pdf , C.pdf to open in new tab or new window when links are clicked.
Is there a way to change behaviour of all hyperlinks in a PDF ?
I have used a create custom link from text java tool from try67
please help
Copy link to clipboard
Copied
Today, I was trying to solve this issue coming from the same pain point stated in the original post -- as I went through a PDF file (open in Chrome) to test the embedded links, to click any of them resulted in the link opening within the same browser tab. To return to the file, I continued to use the Back button. By doing so, the file reloaded itself, forcing me to scroll to the location of the last link I had just tested. This process became cumbersome in a file with over 30 pages and 3X that many links.
The solution I found that works for me (tested in Chrome, Firefox, Edge) as of August 7, 2022 is as follows:
Since this solution works for me, I decided to test it across some of the other cases I read users discussing here in this post. I tested this on my PC using Chrome, Firefox and Edge browsers with the same success in each of them.
I also opened the link in Chrome on my Android cell phone for identical results.
I did not test for cases on Macs, Safari or iPhones, but on an Android phone, this process flowed seamlessly. Yay!
Hoping this helps some of you as well.