PDF Editing Issues

Fix a Missing Document Will Save JavaScript Alert in Adobe Acrobat

Emma BrownEmma Brown Nov 19, 2026 868 views

Question details

The user needs to determine why a PDF form's Document Will Save JavaScript alert no longer appears.

Fix a Missing Document Will Save JavaScript Alert in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form uses document actions and buttons to lock fields and save a flattened-style copy.
Observed behavior
An app.alert in the Document Will Save action no longer appears, although similar JavaScript works in the Document Will Print action.
Before you start

Open the PDF directly in Adobe Acrobat rather than in a browser viewer, and note the Acrobat version under Help > About Acrobat. Check whether the alert is missing during a normal Save, the form's save button, or both.

Solution 1Recommended

Test the Document Will Save action in a simple PDF

Use a minimal test to determine whether the issue is specific to the original form or affects save events more broadly.

1
Open a test PDF

Open a simple PDF in Acrobat with access to JavaScript editing tools. If necessary, create one from a blank document.

2
Add a save action

Open Acrobat's JavaScript tools, choose Set Document Actions, and select Document Will Save. Add the test code app.alert('Will Save test'); and confirm the action.

3
Save the test file

Choose File > Save and check whether the alert appears. If the document has no unsaved changes, make a small edit before saving.

4
Compare the original form

Open Set Document Actions in the original PDF and inspect its Document Will Save script for errors or conditions that might prevent the alert from running.

Test the Document Will Save action in a simple PDF
Tool availability: JavaScript editing tools and their location can vary by Acrobat version and license. A browser PDF viewer or Adobe Acrobat Reader may not provide the same editing controls.
Free Microsoft Office alternative

Work with PDF forms and Office files in WPS Office

WPS Office is a free, lightweight alternative for everyday PDF and Office document work, with a familiar interface and support for common Microsoft Office formats to help you move existing files. It does not fix Acrobat's Document Will Save JavaScript event.

Open and review PDF forms alongside other documentsCompatible with common Microsoft Office formats, including DOCX, XLSX, and PPTXFamiliar interface for working with existing Office filesFree, lightweight suite for everyday document tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why does the print alert work but the save alert does not?

Document Will Print and Document Will Save are separate actions. Open Acrobat's Set Document Actions to compare their scripts, then test the save action in a simple PDF and check the JavaScript console for errors.

Where can I enable JavaScript in Acrobat?

Open Acrobat Preferences, select JavaScript, and check Enable Acrobat JavaScript. If the setting is managed by your organization, contact your administrator before changing it.

Does a form's save button always trigger Document Will Save?

Do not assume that every custom button follows the same path as File > Save. Compare both methods and inspect the button's Properties > Actions to see what its scripts and commands do.

Should I turn off protected mode to test the alert?

First review Preferences > Security (Enhanced), document trust settings, and your organization's policies. Avoid disabling protections without authorization; use Acrobat's console and a simple test PDF to investigate.

Can WPS Office repair the Acrobat JavaScript event?

No. The Document Will Save event is an Acrobat behavior and must be investigated in Acrobat. WPS Office can be used separately for everyday PDF and Office document work.