PDF Editing Issues

How to Auto-Fill and Reset PDF Forms in Adobe Acrobat

Aamir Naveed AkramAamir Naveed Akram Nov 3, 2026 868 views

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.

How to Auto-Fill and Reset PDF Forms in Adobe Acrobat
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the Form Preparation Tool

Launch Adobe Acrobat Pro, open your PDF form, go to 'All Tools' in the menu, and select 'Prepare a form'.

2
Access Document Actions

Click on 'More' within the Prepare Form toolbar (or go to Tools > JavaScript) and select 'Set Document Actions'.

3
Select the Print Event

In the Document Actions dialog box, highlight the 'Document Did Print' event from the list of available actions and click the 'Edit' button.

4
Inject the JavaScript Code

In the JavaScript Editor window, type exactly the following code: this.resetForm();

5
Save and Test

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.

Configure the Document Did Print Action with JavaScript
Crucial Warning for Users: Because this script permanently erases data without a secondary prompt, you must clearly notify your users beforehand that their entered information will be immediately deleted after they print the form.
Edit and Fill PDFs with WPS Office

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. 1. Open Your PDF Form: Launch WPS Office and click on 'Open' to load your interactive questionnaire or PDF form.
  2. 2. Fill Out the Fields: Navigate to the 'Form' or 'Fill & Sign' tab to input answers and populate the required document fields.
  3. 3. Print the Document: Click on 'Menu' in the top-left corner and select 'Print' to generate a physical copy for review.
  4. 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.
Seamlessly fill out and print interactive PDF forms without complex setupsFully compatible with Microsoft Office formats (Word, Excel) and standard PDF form fieldsLightweight, fast, and features a user-friendly interface for effortless document management
microsoft office alternative - wps office

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.