PDF Security & Access Issues

How to Save a Completed Acrobat PDF Form with a Generated Filename

Ayan MasoodAyan Masood Nov 10, 2026 868 views

Question details

The user wants to configure a PDF button to automatically save a completed form to a dynamically generated folder path and filename based on the input from specific form fields.

How to Save a Completed Acrobat PDF Form with a Generated Filename
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Automating the file saving process of a filled PDF form using JavaScript to ensure standardized naming conventions.
Observed behavior
Acrobat JavaScript restricts scripts from creating new folders or silently saving files to arbitrary locations without elevated trusted privileges.
Before you start

Ensure that the destination folder already exists on your local drive, as Acrobat JavaScript cannot automatically create new directories due to strict security restrictions.

Solution 1Recommended

Use the Standard Save As Workflow

This is the safest method for distributing forms to multiple users without needing to install privileged scripts on each individual computer.

Standard Acrobat JavaScript cannot silently save a file or create folders due to security limits designed to protect users from malicious scripts. Instead of silently saving the file, you can construct the filename and rely on the user to finalize the save action.

1
Extract Form Data

Use standard PDF JavaScript to pull values from your form fields (e.g., this.getField('ClientName').value).

2
Construct the Filename

Concatenate the extracted field values to form your desired filename string within the script.

3
Prompt the User

Because silent saving is restricted, configure the form button to alert the user with the suggested filename, and instruct them to use the 'File' > 'Save As' menu to manually navigate to the pre-existing folder and paste the suggested name.

Use the Standard Save As Workflow
Security Limitation: Non-privileged scripts cannot automate the 'Save As' dialog box to pre-fill the path. Manual user intervention is required.
Free Microsoft Office alternative

Manage PDFs and Office Documents with WPS Office

If managing complex Acrobat JavaScript security permissions is too cumbersome for your daily workflow, consider using WPS Office. It provides a lightweight, easy-to-use PDF editor alongside a complete suite of productivity tools for handling everyday documents without the hassle.

Free and lightweight PDF editing, reading, and form fillingFully compatible with standard PDF formats and Microsoft Office filesFamiliar user interface ensuring seamless migration and zero learning curveBuilt-in tools for seamless document conversion and protection
microsoft office alternative - wps office

Frequently Asked Questions

Can a PDF JavaScript create a new folder on my computer?

No. Acrobat JavaScript has strict security restrictions that prevent scripts from creating new folders or directories. The destination folder must already exist on the local drive before attempting to save the file.

Why does my PDF form ask for permission when trying to save automatically?

Scripts that attempt to silently save files require elevated privileges to prevent malicious activities. Without a locally installed trusted script (.js file) on the computer, the application blocks the action and prompts the user to ensure security.

How do I dynamically generate a filename from PDF form fields?

You can use standard JavaScript in your PDF button properties to read field values (using this.getField('FieldName').value) and concatenate them into a single text string. However, automatically saving the file with this string requires either trusted folder-level scripts or manual 'Save As' actions by the user.