Open links in new window in hosted pdfs

Posted on 2013-01-16
Last Modified: 2013-02-03
I have the professional version of AutoBookmark, an Adobe Acrobat Pro plugin from Evermap.  I am able to convert links in a base pdf file to execute javascript so that links open in a new window. However, one of the links I have in my base pdf is another pdf file. In THAT pdf file, I have some links to another website, in particular to I have also used the AutoBookmark plugin to convert these links so that they also open in a new window. However, when I publish the base pdf and the “linked to" pdf file on my website, browse to the base pdf and click the link to the "linked to"  pdf file, and then click the link to in that pdf file, the website does NOT open in a new window.

To make this more concrete - I have a website called In that website there is a navigation button called “Parents Corner.” If you now click on “Part 1” in the accordion, the first link is a pdf called “Quick Help For Families in Transition.” If you open that one and then click the link called “Quotes on UpToParents,” this Quotes page opens up. If you now click the link near the top called, it should open in a new window, but does not.

The links in the pdf called “QuotesUTP.pdf” open in new windows when the file is on my local machine, but once uploaded, they no longer open in new windows.  In addition, if I simply browse to, then any link in that document, e.g., the link: DOES open in a new window. It just seems that when the pdf QuotesUTP.pdf is linked to from a parent pdf (in this case, QuickHelpForFamiliesInTransition.pdf), links in QuotesUTP.pdf don't open in new windows when clicked.

Any help would be appreciated.

Thanks in advance.
Question by:karnac2020
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
LVL 44

Accepted Solution

Karl Heinz Kremer earned 500 total points
ID: 38787181
When you add a link to a web page in Adobe Acrobat, there is no option to specify "open in new window" - that is kind of implied because the web page will be opened in the browser, which is a "new" window. You only get the option to select to re-use the current window or use a new window when you open another PDF file via a link.

How that web link is opened when you view the PDF file in the browser is up to the browser. I was not able to reproduce your results where links in (when this file is opened directly) are opened in a new window - they always open in the same window or the same tab. This is with Safari on a Mac.

As far as I know there is no way to specify how a web link is opened when you use the "Open a web link" action. You can however do it by using a JavaScript action. I don't know if the AutoBookmark application supports that. You can definitely do it in Acrobat:

Select the "Add or Edit Link" tool, then draw your link rectangle. This will bring up the properties dialog (you can also right-click on an existing link and select the properties option).
Select to add a "Custom link" and click on "Next". On the next dialog select the "Actions" tab and select to "Run a JavaScript" and click on "Add". In the editor window, paste the following  line:

app.launchURL("", true);

The second argument ("true") specifies if the link should be opened in a new window or tab.

Author Comment

ID: 38787629
Dear khkremer,

Thanks for your email. I see what you are talking about. I was using windows with FF and the links opened for me in new windows when going directly to QuotesUTP.pdf, but I just tried it in Safari on the Mac and they didn't open in new windows. This might be because Safari is using Preview as opposed to Adobe Reader to open the pdf?

Do you know a way of telling Safari to use Adobe Reader instead of Preivew?

LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 38787674
If the Adobe Reader or Acrobat is installed on your Mac, it should already display PDF files with the Adobe application - at least it does on my system. So, using Preview is not the reason why the link does not open a new window. Again, there is no mechanism to do that with just a link, you need to use a custom JavaScript action for this to work.

Open up the Preferences in Reader or Acrobat and select the "Internet" category. It should tell you if Reader or Acrobat are configured to display PDFs in a browser window.
SuperAntiSpyware Licenses Discounted by 25% !

Exclusive offer to Experts Exchange Members!
Buy SuperAntiSpyware License(s) from us and save 25% on the regular purchase price.
- Includes Full SuperAntiSpyware Vendor Support Entitlements
- Your Subscription does not begin until you activate your license
- Buy for your friends


Author Comment

ID: 38787884
I have set the links (in Adobe Acrobat Pro) to open in new windows by using the JavaScript app.launchURL("", true); routine. That is why I can't figure out why they don't open in a browser (or new) window.

There must be something wrong with my Mac implementation, because now, none of the links in the QuickHelp pdf open at all. Because of that I  switched the documents back to Word format, but that is also a pain because in Safari, Word documents are not considered "Safe" and thus the document goes into the downloads folder instead of being opened directly in Safari.

LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 38796527
You may want to repair your Acrobat or Reader installation on your Mac. This may involve re-installing the software.

Author Comment

ID: 38796567
What I can't figure out (at least it works like this in windows using FireFox)
is that weblinks open in new windows on the base document (Quick Help....)
but when that document links to a pdf (QuotesUTP.pdf), weblinks at that second level document do NOT open in new (browser) windows.

I don't know why they would open in new browser windows in the top level document, but not in the one that is linked to.

LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 38796605
Are you sure the links were created the same way in both documents? As you know, links via the JavaScript construct open differently than regular links.

Author Comment

ID: 38797445
Yes, I just checked and the links in both documents use javascript. It seems that it has something to do with the fact that the first document links to a pdf which has javascript enabled links in it. I checked the link encoding, and javascript it also used in the "inside" file.

Featured Post

Create Professional Looking Email Signatures

Create "Professional HTML Email Signatures" with ease.
7 Day Money Back Guarantee if not 100% Satisfied.
Affordable - Try it out for 7 Days Totally Risk Free.
Installers provided for over 45 Email clients.
Both Windows & MAC Supported.
Highly Recommended!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
In this second video of the Xpdf series, we discuss and demonstrate the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). Download and inst…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question