These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Linking between files using Javascript and displayed in Internet explorer

kpkavanaugh
Registered: Aug 27 2007
Posts: 6

I have two pdf files that are linked internally and between each other. They work fine when run in Adobe Acrobat, but if you open one of the files in Internet Explorer, the internal links work just fine, but the links that go between the two files don't work. I was told there is nothing that can be done to fix this problem, Is that true?

My Product Information:
Acrobat Pro 7.0.5, Windows
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
No it's not true. You can link between files when showing PDFs within Web browsers. However, if you set your links in Acrobat using actions like Open a file or Go to a page view those links won't work in a Web browser.

You need to use the Open a web page action and set the link to a URL where the PDFs are hosted such as: (http://www.mycompany.com/myFile.pdf).

If you want to use JavaScript, then the code would be: app.launchURL(“http://www.mycompany.com/file.
pdf”, true);

The true switch opens the link in a new browser window. If you want the link to open in the same window substitute true with false.

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.

kpkavanaugh
Registered: Aug 27 2007
Posts: 6
Ted,

Thanks for your response,

[url=http://www.acrobatusers.com/forums/ask_an_expert/questions/view/3734/]http://www.acrobatusers.com/forums/ask_an_expert/questions/view/3734/[/url]

but there are other complications to this project.

First, like I said before, I have two PDF files (WD_123 and WD_ABC) that we have added lots of Hyperlinking back and forth between the two books using JavaScript. On some computers, these files will use the Adobe Reader plug in for Internet Explorer, and on other computer the files will be used using Adobe Reader by itself. These files might be loaded on a desktop or located somewhere else either on that computer or even on a network, but both files will be stored together in the same directory.

There are also several hundred other PDF files loaded on some of the computers that will display the files in the browser, these computer must play these other PDFs in the Internet Explorer browser.

So using the “Open a web page action and set the link to a URL where the PDFs are hosted such as: (http://www.mycompany.com/myFile.pdf). “ as you suggested would not work since the files could be located anywhere.

I thought about creating another PDF file (lets call it the menufile.pdf) it would be launched in the browser, the menufile.pdf would ask the user which file they wish to open, WD_123 or WD_ABC. The javascript in the menufile.pdf would have JavaScript hyperlinks in it that would force the files (WD_123 or WD_ABC) to open up in the actual Adobe Reader (not the plug in) but I do not know how to code this, or if it’s even possible to do.

That way if they are using the browser, it would launch the menufile.pdf, and if they are using the files WD_123 or WD_ABC by themselves, they could open them up in Adobe Reader and no matter which way they went to view the data, the hyperlinks would all work.

Any other ideas?

Kerry
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
Kerry,

I understand this a little better now. Unfortunately, I don't know if you can code the JS to force files to open in Reader. It may be possible but I don't have a clue as to how to do it. I think your next step might be to post the question in the User Forum. There may be some people monitoring the forum who have had a similar need and found a solution.

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.