How to Create a Bookmark to Open a PDF Attachment
Question details
The user needs to set up a bookmark in a PDF file that directly opens a PDF attachment embedded within a different PDF document.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Creating a cross-document navigation link via bookmarks to access an attached file in an external PDF.
- Observed behavior
- Acrobat JavaScript does not support creating direct cross-document attachment bookmarks, preventing the user from using scripts to automate this link.
Ensure both the primary PDF document and the target PDF containing the attachment are saved in the same local folder to prevent broken file paths when creating the link.
Use the "Go to a Page View" Action
Since direct JavaScript execution is unsupported for this specific scenario, utilizing the native "Go to a Page View" link action provides an effective workaround to open the attachment.
While PDF viewers restrict JavaScript from directly triggering an attachment housed in an external PDF for security reasons, you can manually configure a cross-document navigation link using built-in link actions. This involves keeping a link-creation window open while you manually navigate to the target attachment.
Open your primary PDF document, navigate to the Bookmarks panel on the left, and click the 'New Bookmark' icon.
Right-click the newly created bookmark and select 'Properties'. In the Properties window, click on the 'Actions' tab.
From the 'Select Action' drop-down menu, choose 'Go to a page view' and click 'Add'. A floating dialog box labeled 'Create Go to View' will appear. Do not close this box yet.
With the floating dialog still open, open your secondary target PDF file. Expand its Attachments panel and double-click to open the specific PDF attachment you want to link to.
Once the attached PDF is visible in your viewer, click the 'Set Link' button on the floating 'Create Go to View' dialog box to complete the action setup.

Use WPS Office to Manage PDF Bookmarks and Attachments
WPS PDF provides a highly intuitive interface for adding, editing, and managing bookmarks and file attachments within your PDF documents, offering a smooth and secure document editing experience.
- 1. Open your PDF: Launch WPS Office and open your PDF document using the WPS PDF viewer.
- 2. Add an Attachment: Navigate to the 'Insert' tab on the top ribbon and click on 'Attachment' to embed external files directly into your PDF document.
- 3. Create Bookmarks: Click the Bookmark icon on the left navigation pane to easily add, rename, and organize bookmarks to improve document readability.

Frequently Asked Questions
Why can't I use JavaScript to open a PDF attachment from another file?
For security reasons, standard PDF viewers restrict cross-document JavaScript executions. Scripts are typically sandboxed to the current document to prevent malicious code from automatically opening or executing external files and attachments without user consent.
What happens to the bookmark if I move the linked PDF files to another folder?
If you use the 'Go to a Page View' action to link to an external file's attachment, the link relies on relative or absolute file paths. Moving the files to a different directory or sending them to another user separately will break the link. Always keep related files in the same relative folder structure.
Can I link to non-PDF attachments using the page view method?
No. The 'Go to a Page View' method specifically requires rendering the target document within the PDF viewer. Since non-PDF attachments (like Word or Excel files) open in their respective native applications rather than the PDF viewer window, you cannot set a page view link to them.




