How to Auto-Fill and Reset PDF Forms in Adobe Acrobat
Question details
The user needs a method to populate questionnaire answers into multiple PDF forms, allow users to print them, and automatically erase the entered data immediately after printing.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- Setting up an interactive PDF form workflow where sensitive or repetitive questionnaire data must be cleared after printing to prepare for the next user.
- Observed behavior
- Requires a functional automation within the PDF document to trigger a form reset action instantly upon a print event.
Ensure you have Adobe Acrobat Pro installed, as standard PDF readers generally do not allow you to configure document-level JavaScript actions. It is also highly recommended to save a backup of your original PDF form before adding any automated scripts.
Configure the Document Did Print Action with JavaScript
Use Adobe Acrobat Pro's built-in JavaScript event actions to automatically clear all form fields the moment the document finishes printing.
By utilizing document-level JavaScript, you can instruct the PDF to execute a specific command based on user actions. In this case, tying the 'resetForm()' method to the 'Document Did Print' event ensures that user data is erased as soon as the physical copy is generated.
Launch Adobe Acrobat Pro, open your PDF form, go to 'All Tools' in the menu, and select 'Prepare a form'.
Click on 'More' within the Prepare Form toolbar (or go to Tools > JavaScript) and select 'Set Document Actions'.
In the Document Actions dialog box, highlight the 'Document Did Print' event from the list of available actions and click the 'Edit' button.
In the JavaScript Editor window, type exactly the following code: this.resetForm();
Click 'OK' to close the editor, then save the document. Fill in some test data and print the file to verify that the fields automatically clear after printing.

Easily Fill, Manage, and Reset PDF Forms with WPS PDF
If you are looking for an accessible way to manage PDF documents, WPS Office provides a comprehensive suite to quickly fill out interactive forms, add text, print questionnaires, and securely handle your files.
- 1. Open Your PDF Form: Launch WPS Office and click on 'Open' to load your interactive questionnaire or PDF form.
- 2. Fill Out the Fields: Navigate to the 'Form' or 'Fill & Sign' tab to input answers and populate the required document fields.
- 3. Print the Document: Click on 'Menu' in the top-left corner and select 'Print' to generate a physical copy for review.
- 4. Reset or Close: To clear the data for the next user, you can either click any built-in 'Reset' button on the form, or simply close the file without saving the changes.

Frequently Asked Questions
Why isn't my PDF form resetting after I print it?
If the form isn't resetting, ensure you have placed the 'this.resetForm();' script specifically in the 'Document Did Print' action, not the 'Document Will Print' action. Also, check if JavaScript execution is enabled in your PDF reader's security preferences.
Can I reset only specific fields instead of the entire document?
Yes. You can modify the JavaScript code to target specific fields by passing an array of field names. For example, use this.resetForm(['NameField', 'EmailField']); to clear only those designated fields while keeping the rest of the data intact.
Do users need Adobe Acrobat Pro to trigger the reset script?
No, users do not need the Pro version to trigger the script. As long as they open the PDF in a compliant reader (like standard Adobe Acrobat Reader or WPS PDF) that supports document-level JavaScript, the form will automatically reset after printing.




