This is Google's cache of https://answers.acrobatusers.com/How-I-open-hyperlinks-inside-embedded-pdf-window-q2104.aspx. It is a snapshot of the page as it appeared on Apr 21, 2024 11:54:28 GMT. The current page could have changed in the meantime. Learn more.
Full versionText-only versionView source
Tip: To quickly find your search term on this page, press Ctrl+F or ⌘-F (Mac) and use the find bar.
How do I open hyperlinks inside embedded pdf in a new window? (JavaScript)


How do I open hyperlinks inside embedded pdf in a new window?

I have a pdf that contains hyperlinks to other website. This pdf itself is available as a link on a website. When this pdf is loaded in IE window, and user clicks on any of the links inside this PDF, the link opens in the same window. I want all the links to open in a new window.
I have tried different softwares to publish the pdf (MS Word, Open Office, Bull PDF, online services), but the links inside the pdf always open in the same window


Yatish Ram


2 Answers

Voted Best Answer

Hi,

If you want to open a PDF in a new browser window from a PDF viewed in a browser window, you need a little help using JavaScript.

Create a button field or link and in the Action tab, select Run a JavaScript from the Select Action pull-down menu. Click the Add button to open the JavaScript Editor and type the following code in the Editor window:


app.launchURL("http://www.mycompany.com/pdfDocument.pdf", true);


In the above code, replace www.mycompany.com with your URL. Replace pdfDocument.pdf with the name of the PDF you want to open. The "true" statement triggers opening the PDF in a new browser window.

;-)


By JR Boulay   

Acrobat has this option built into it. Go to Edit>Preferences>Internet. In the Web Browser Option section, deselect Display PDF in browser.

Making this change will result in a security alert for links opening outside the PDF, but you’ll get this warning only once for each external site. You’ll need to click the box Remember this action for this site for all PDF documents, then click “Allow” to OK the security of the external site.


Linda Watson   


Please specify a reason: