How to Populate an Acrobat PDF Dropdown from External Data
Question details
The user wants to populate a dropdown list in a PDF document using an externally managed data source.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating dynamic PDF forms that pull dropdown options from external files stored locally, on a network, or via a web server.
- Observed behavior
- Needs to properly configure Acrobat JavaScript and navigate security settings to allow the PDF to read external data.
Verify the location of your external data source (local machine, network drive, or website) and ensure you have the administrative permissions required to install trusted scripts on the end-users' devices.
Use Folder-Level Trusted JavaScript for Local or Network Data
Because of Acrobat's security sandbox, reading local or network data requires a trusted folder-level script installed on each user's computer.
Acrobat restricts document-level scripts from accessing local files directly for security reasons. To bypass this safely and pull external data into your PDF, you must create a trusted function inside a folder-level JavaScript file (.js) that is deployed to the Acrobat application folder on every user's machine.
Navigate to the Acrobat installation directory on the local machine and find the 'JavaScripts' folder (typically located at C:\Program Files\Adobe\Acrobat DC\Acrobat\JavaScripts).
Open a plain text editor and create a new .js file. Write a script utilizing the `app.trustedFunction` method that includes the logic to read your external data file (such as a text or CSV file).
Distribute and install this .js file into the JavaScripts folder on the local machines of all users who need to use the PDF form.
Open your PDF in Acrobat, go to the dropdown field properties, and add a custom calculation or initialization script that calls your trusted function to dynamically populate the list.

Fetch Data from a Web Server via JavaScript
If the PDF is opened in an environment where users have internet access, you can fetch dropdown data directly from a web URL.
Easily Create and Manage PDF Forms with WPS Office
While populating dropdowns from external data requires complex JavaScript deployment in Acrobat, WPS Office provides an intuitive and user-friendly interface for creating, editing, and managing PDF forms without a steep learning curve.
- 1. Open your PDF: Launch WPS Office and open your PDF document.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access various form controls, including text fields, checkboxes, and dropdowns.
- 3. Edit Dropdown Properties: Double-click your desired dropdown field to manually add, edit, or remove list items via the easy-to-use properties menu.
- 4. Save and Share: Save your fillable PDF and distribute it to your team for seamless data collection.

Frequently Asked Questions
Can a PDF dropdown list automatically update when the external file changes?
Yes, if configured with a folder-level trusted script or a web-fetch script, the dropdown can pull the latest data each time the PDF is opened or when a specific form trigger event occurs.
What file formats can be used as an external data source for PDFs?
Common formats include TXT, CSV, and XML for local or network-based files. If fetching data from a web server, JSON or XML are typically the most reliable formats to parse with JavaScript.
Why is my JavaScript failing to read a local file in Acrobat?
Acrobat's strict security sandbox prevents document-level scripts from reading local files directly. You must use a folder-level script with the `app.trustedFunction` parameter to grant the necessary read permissions.




