Can PDF Links Open Relative Folder Paths?
Question details
The user needs to know if PDF links can open local directories using relative folder paths so the links remain functional when distributed to other computers.

- Product
- Device & OS
- not provided
- Scenario
- Creating a PDF table of contents with portable links that are intended to open directories within a shared folder structure across different computers.
- Observed behavior
- Links to open folders directly, whether using relative or absolute paths, are not supported or do not function reliably in standard PDF readers.
Ensure that your main PDF document and all associated files are stored within the same main directory folder before creating any relative links.
Link to a Specific Index File Instead of a Folder
Since standard PDF links cannot reliably open folder directories, the best workaround is to link to a specific index file (like a PDF or HTML document) placed inside the target folder.
PDF security restrictions and structural limitations prevent hyperlinks from executing directory listings or opening the local file explorer directly. To achieve portable navigation, you must link to an actual file rather than the folder itself.
Create an 'index.pdf' or 'index.html' file inside the target folder that acts as a table of contents for that specific directory.
Open your primary PDF document in your preferred PDF editor.
Select the text or shape you want to link, right-click, and choose 'Add Link' or 'Hyperlink' from the context menu.
Choose the action to 'Open a File', browse to the target folder, and select the index file you created. Ensure the path is saved as a relative path so it remains portable.

Create an HTML-Based Directory Listing
If you need users to browse through multiple files within a folder, use an HTML file to handle the folder navigation instead of relying purely on the PDF.
Easily Manage PDF Links with WPS Office
WPS Office offers a versatile PDF editor that allows you to seamlessly insert, edit, and manage relative file links, ensuring your portable document packages work flawlessly across different devices.
- 1. Open your document in WPS Office: Launch WPS Office and open the PDF file where you want to add portable links.
- 2. Access the Edit tools: Navigate to the 'Edit' tab located on the top ribbon menu.
- 3. Select the Link tool: Click on the 'Link' button and choose 'Add/Edit Link' from the dropdown options.
- 4. Define the link area: Draw a rectangle over the specific text or image you want to make clickable.
- 5. Set the target file: In the dialog box, select 'Open a File', browse to your target file within the same directory structure, and save the document.

Frequently Asked Questions
Why can't a PDF link open a folder directory directly?
Standard PDF specifications and security restrictions in most PDF readers intentionally prevent links from executing local system commands, such as opening a file explorer or displaying a directory listing. Links are restricted to opening specific files, navigating to other pages, or launching web URLs.
What is a relative path in a PDF?
A relative path defines the location of a linked file in relation to the current PDF document, rather than providing the full absolute system path (like C:\Documents\Folder\file.pdf). This allows the links to remain unbroken when the entire folder structure is moved to a different computer.
Will my relative links work on both Windows and Mac?
Yes, as long as you link to specific files rather than folders and maintain the exact internal folder structure when transferring the files, relative file links will function correctly across different operating systems.
Can I link to an Excel or Word file using a relative path in a PDF?
Yes, you can configure a hyperlink in your PDF to open any specific file format, including Excel (.xlsx) or Word (.docx) documents. The link will work provided the recipient has the appropriate software installed to open those specific file types.




