How to Open PDF Links in a New Browser Tab or Window
Question details
The user wants to configure URL links within a PDF document so that clicking them opens the target web page in a new browser tab or window, leaving the original PDF document open.

- Product
- PDF Editors
- Device & OS
- not provided
- Scenario
- Adding or editing hyperlinks in a PDF to control the web browser's behavior when the link is clicked.
- Observed behavior
- Standard web URL actions in PDFs often open in the same browser tab, replacing the active PDF document instead of launching a new tab.
Keep in mind that while you can add JavaScript commands to request opening a link in a new window, the final behavior relies heavily on the user's specific browser security settings and their chosen PDF viewer.
Use Acrobat JavaScript to Launch the URL
Apply a simple JavaScript action to the hyperlink instead of a standard URL action to request that the link opens in a separate browser window.
A standard PDF web link cannot reliably control whether a browser opens a new tab or uses the current one. However, by using the app.launchURL JavaScript method with the proper parameter, you can instruct the viewer to open a new window.
Open your PDF editor and navigate to the tools menu to add or edit a hyperlink.
Draw the link box over the text or image you want to make clickable, or double-click an existing link to open its properties.
In the Link Properties dialog, go to the Actions tab. Select 'Run a JavaScript' from the 'Select Action' dropdown menu and click 'Add'.
In the JavaScript editor, enter the following code: app.launchURL("https://www.your-url.com", true); Ensure you replace the URL with your target link. The 'true' parameter is what specifically requests a new window.

Easily Manage PDF Hyperlinks with WPS Office
WPS Office provides a comprehensive and user-friendly PDF editor that allows you to easily insert, edit, and manage hyperlinks within your documents without needing complex configurations.
- 1. Open PDF: Launch WPS Office and open your PDF document.
- 2. Navigate to Edit: Click on the 'Edit' tab located on the top ribbon.
- 3. Select Link Tool: Click on 'Link' and select 'Add/Edit Link' from the dropdown menu.
- 4. Add Web Address: Draw a rectangle over the target area, select 'Open a web page', and enter your desired URL.

Frequently Asked Questions
Why do my PDF links open in the same tab by default?
Most modern web browsers handle PDF links similarly to regular web links. If the user's browser is set to open links in the same tab, standard PDF URL actions will follow that default browser behavior.
Does the JavaScript app.launchURL method work on mobile devices?
Support for PDF JavaScript varies greatly across mobile PDF viewers. Many default mobile PDF readers do not support JavaScript for security reasons, so the link may not work at all or might default to opening in the same tab.
Can I use standard HTML attributes like target="_blank" in a PDF?
No, PDFs do not use HTML for link properties. You cannot apply HTML attributes directly to a PDF link; you must use PDF-specific actions like Acrobat JavaScript to achieve similar results.




