Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 965
  • Last Modified:

Open links in new window in hosted pdfs

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 www.UpToParents.org. 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 www.UpToParents.org in that pdf file, the website www.UpToParents.org does NOT open in a new window.

To make this more concrete - I have a website called www.UpToParents.org. 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 UpToParents.org, 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 www.UpToParents.org/files/docs/QuotesUTP.pdf, then any link in that document, e.g., the link: www.UpToParents.org 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.
Mark
0
karnac2020
Asked:
karnac2020
  • 4
  • 4
1 Solution
 
Karl Heinz KremerCommented:
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  www.UpToParents.org/files/docs/QuotesUTP.pdf (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("http://www.uptoparents.org/", true);

The second argument ("true") specifies if the link should be opened in a new window or tab.
0
 
karnac2020Author Commented:
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?

Thanks
Mark
0
 
Karl Heinz KremerCommented:
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.
0
[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 
karnac2020Author Commented:
I have set the links (in Adobe Acrobat Pro) to open in new windows by using the JavaScript app.launchURL("http://www.uptoparents.org/", 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.

Mark
0
 
Karl Heinz KremerCommented:
You may want to repair your Acrobat or Reader installation on your Mac. This may involve re-installing the software.
0
 
karnac2020Author Commented:
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.

Mark
0
 
Karl Heinz KremerCommented:
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.
0
 
karnac2020Author Commented:
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.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now