Fix Acrobat Document JavaScript and Layer Controls After an Update
Question details
Restore document-level JavaScript and layer-control actions in a PDF after an Acrobat or Creative Cloud update.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A PDF uses document-level scripts and actions to control layers.
- Observed behavior
- The scripts and layer-control actions may stop working after an update.
Open the affected PDF in Acrobat and identify the buttons or actions that no longer work. Have the document-level script code available so you can compare it with any console errors.
Check Acrobat JavaScript settings and console errors
Use this first to determine whether JavaScript is disabled or a script is reporting an error.
Open Acrobat Preferences or Settings, select JavaScript, and check whether Enable Acrobat JavaScript is selected. Enable it if necessary, then reopen the PDF.
Open Acrobat's JavaScript console with Ctrl+J on Windows or Command+J on Mac. Clear existing messages, then trigger the affected button or action and look for new errors.
In Acrobat, choose Help > Check for updates, install any available updates, and test the PDF again. Compare any new console messages with the document-level script.

Review the PDF scripts and layer-control actions
Use this if JavaScript is enabled but a particular document or action still fails.
Use WPS Office for everyday PDF and document work
WPS Office is a free, lightweight alternative for everyday document work, with PDF tools, a familiar interface, and compatibility with common Microsoft Office formats for easier migration. It does not fix Acrobat JavaScript or guarantee that Acrobat-specific scripts and layer actions will run.

Frequently Asked Questions
Where do I enable JavaScript in Acrobat?
Open Acrobat Preferences or Settings, select JavaScript, and check Enable Acrobat JavaScript. Reopen the PDF and test the action again.
How can I see why a PDF script failed?
Open Acrobat's JavaScript console with Ctrl+J on Windows or Command+J on Mac. Trigger the failing action and check the console for an error message and any referenced line.
Why do the layer buttons still fail when JavaScript is enabled?
A button action may reference an incorrect layer or hidden field name, or the script may use an unsupported API. Review the button's Actions and document-level scripts against the current PDF structure and console errors.
Can WPS Office repair Acrobat-specific JavaScript?
No. WPS Office can be used for everyday PDF work, but it does not repair Acrobat scripts or guarantee that Acrobat-specific JavaScript and layer actions will run.




