PDF Security & Access Issues

Can a PDF JavaScript Dialog Open a UNC Network Folder Link?

Emma BrownEmma Brown Nov 3, 2026 869 views

Question details

The user wants to know if it is possible to include a clickable UNC or mapped network folder path inside a PDF JavaScript dialog that directly opens Windows Explorer.

Can a PDF JavaScript Dialog Open a UNC Network Folder Link?
Product
PDF
Device & OS
Windows
Scenario
Attempting to create a clickable network folder link within a PDF JavaScript dialog for users to seamlessly access shared network locations.
Observed behavior
Standard PDF security restrictions block scripts and dialog text from dynamically launching local or network file paths to protect users from potential security threats.
Before you start

Keep in mind that modern PDF readers enforce strict security policies to prevent malicious scripts from accessing local or network directories. Standardizing how you share internal paths as text can save users from encountering errors.

Solution 1Recommended

Provide the UNC Path as Plain Text

Since JavaScript cannot securely execute folder links in a PDF dialog, providing the network path as plain text allows users to copy and navigate to the location manually.

PDF security restrictions intentionally prevent JavaScript dialogs from launching local or network locations (such as UNC paths or mapped drives) to protect environments from unauthorized scripting attacks.

1
Format path as text

Design your PDF JavaScript dialog script to output the UNC network path (e.g., \\server\shared\folder) strictly as plain text.

2
Add user instructions

Include a brief instruction within the dialog prompt advising the user to highlight and copy the displayed folder path.

3
Manual navigation

Instruct the user to manually open Windows Explorer, paste the copied UNC path into the top address bar, and press Enter to access the network folder safely.

Provide the UNC Path as Plain Text
Security Prompt Awareness: Even standard hardcoded hyperlinks pointing to local or network files will typically trigger a security warning prompt in most PDF readers.
Manage PDFs Securely with WPS Office

Edit and Secure Your PDF Documents Easily

WPS Office provides robust PDF editing capabilities, allowing you to safely insert standard hyperlinks, manage document security, and modify content without relying on complex scripting.

  1. 1. Open your PDF: Launch WPS Office and open the PDF document you need to modify.
  2. 2. Edit Links: Navigate to the 'Edit' tab and click on 'Link' to manually insert functional document links pointing to web or file URIs.
  3. 3. Save and Distribute: Configure document permissions if required, and save your PDF file for secure distribution across your network.
Easily insert, edit, and manage hyperlinks directly within your PDF documents.High format compatibility with Adobe Acrobat, ensuring consistent security behaviors and viewing experiences.Lightweight and fully featured free Office suite for handling all daily document workflows.
microsoft office alternative - wps office

Frequently Asked Questions

Why do PDF readers block UNC paths inside JavaScript dialogs?

PDF readers enforce strict application sandboxing and security restrictions to prevent malicious scripts from gaining unauthorized access to the user's local file system or local area network. Scripts attempting to launch local processes are therefore blocked.

Can I use the file:// protocol in a PDF to open a network drive?

Yes, you can use the file:// protocol (e.g., file://///server/folder) for hardcoded hyperlinks within the body of the PDF document. However, users will typically encounter a built-in security warning prompt asking for confirmation before the link is allowed to open.

Is there any way to bypass PDF security warnings for local links?

Generally, no. For safety reasons, these security warnings cannot be bypassed via the document itself. The behavior is controlled entirely by the end-user's application settings or enterprise network policies, such as the Trust Manager settings.