Solved

Open links in new window in hosted pdfs

Posted on 2013-01-16
8
808 Views
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 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
Comment
Question by:karnac2020
  • 4
  • 4
8 Comments
 
LVL 44

Accepted Solution

by:
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  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
 

Author Comment

by:karnac2020
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?

Thanks
Mark
0
 
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.
0
 

Author Comment

by:karnac2020
ID: 38787884
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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.
0
 

Author Comment

by:karnac2020
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.

Mark
0
 
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.
0
 

Author Comment

by:karnac2020
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.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe INTRODUCTION This article presents a solution to a question (http://www.experts-exchange.com/Programming/Installation/Q_28396542.html)…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now