How to Automatically Open Multiple PDF Files When Opening One PDF
Question details
The user wants to configure a primary PDF instruction document to automatically launch three related PDF forms as soon as it is opened, without requiring users to manually find and click links.

- Product
- Device & OS
- not provided
- Scenario
- Creating an instructional PDF bundle where related forms are presented to the end-user automatically upon opening the main file.
- Observed behavior
- The user is looking for a way to script or configure a PDF to trigger an auto-open action for secondary files, bypassing manual link interaction.
Verify the security settings of the intended PDF viewers your audience will use, as modern PDF readers often block automatic document actions and JavaScript execution by default to prevent malicious activity.
Use Document-Level JavaScript to Trigger File Opens
Embed custom JavaScript into the primary PDF to execute a file-open command automatically when the document loads.
This method requires a professional PDF editor that supports adding document-level JavaScript. Keep in mind that end-users must have JavaScript enabled in their PDF readers, and local security restrictions might prompt them for permission before opening secondary files.
Open your primary PDF instruction document in a professional PDF editor that supports JavaScript customization.
Go to the JavaScript or Document Actions section, usually located under 'Tools', 'Form Settings', or 'Document Properties'.
Set an action for 'Document Did Open' and insert a script using the 'app.openDoc()' method, specifying the exact local file paths or URLs of the three related forms.
Save the primary PDF and open it in a standard viewer to ensure the secondary files launch. Be prepared to click 'Allow' if a security warning appears.

Bundle Documents as File Attachments
Since automatic opening is often blocked by security settings, bundling the forms directly as file attachments is a highly reliable alternative.
Manage and Link Multiple PDFs Seamlessly with WPS Office
WPS Office provides a robust built-in PDF editor that allows you to easily manage attachments, add interactive links, and organize multiple PDF forms into a single, seamless reading experience without complex scripting.
- 1. Install WPS Office: Download and install WPS Office on your device.
- 2. Open your PDF: Launch the WPS PDF tool and open your primary instructional document.
- 3. Add attachments or links: Navigate to the 'Insert' tab to safely add the secondary PDF forms as attachments or create highly visible interactive links.
- 4. Save and distribute: Save your newly bundled document and share it with your users for a streamlined, secure experience.

Frequently Asked Questions
Why did the automatic file open fail when I sent it to another computer?
Different PDF readers have varying security policies. Many block JavaScript or auto-open actions by default to protect users from malicious files. Users may need to manually click 'Trust this document' or enable JavaScript in their application preferences.
Can I automatically open files if they are hosted online in a cloud storage service?
Yes, but you will need to use precise, direct URLs in your auto-open scripts or links rather than local file paths. Ensure the cloud hosting platform allows direct access to the files without requiring a login for each individual document.
Is there a way to force files to open without using JavaScript?
Without JavaScript, a true automatic open upon loading is not supported by standard PDF specifications for security reasons. The closest alternative is combining the documents into a PDF Portfolio or adding clear, prominent buttons that users can click to open attachments.




