PDF Editing Issues

Fix PDF Date JavaScript Not Working in Adobe Reader

Amos GikundaAmos Gikunda Nov 3, 2026 869 views

Question details

User has a PDF form containing a JavaScript that automatically inserts the current date. This script functions correctly when opened in Acrobat DC on a Mac, but fails to execute when the PDF is viewed in Adobe Reader on a different computer.

Fix PDF Date JavaScript Not Working in Adobe Reader
Product
Adobe Acrobat DC / Adobe Reader
Device & OS
Mac / Other OS
Scenario
Using a JavaScript to automatically fill a specific form field with the current date when opening or viewing a PDF document.
Observed behavior
The date script runs successfully in the full version of Acrobat DC, but it does not trigger or populate the date field when the document is opened in Adobe Reader.
Before you start

Ensure you have the latest version of Adobe Reader installed on the target computer, and verify that the target date form field is not set to 'Read Only' in the original document properties.

Solution 1Recommended

Enable JavaScript and Check Security Settings in Adobe Reader

Adobe Reader might have JavaScript disabled by default or blocked by security features like Protected Mode.

By default, Adobe Reader on some computers may restrict JavaScript execution to prevent malicious code from running. Adjusting the Preferences can resolve this issue without altering the PDF itself.

1
Open Adobe Reader Preferences

Launch Adobe Reader on the computer where the script is failing. Go to 'Edit' > 'Preferences' (Windows) or 'Acrobat Reader' > 'Preferences' (Mac).

2
Enable Acrobat JavaScript

Select the 'JavaScript' category from the left sidebar. Check the box next to 'Enable Acrobat JavaScript' and ensure execution privileges are granted.

3
Adjust Protected Mode

Navigate to the 'Security (Enhanced)' category in Preferences. If the issue persists, temporarily uncheck 'Enable Protected Mode at startup' to see if sandboxing is blocking the script. Restart Adobe Reader and open the PDF again.

Enable JavaScript and Check Security Settings in Adobe Reader
Security Warning: Disabling Protected Mode can expose your system to security risks from unverified PDFs. Only disable this feature for trusted documents.
Free Microsoft Office alternative

Try WPS Office for Easy PDF and Document Management

If complex JavaScript configurations in Adobe Reader are causing workflow issues, try WPS Office. It's a comprehensive, lightweight suite that handles PDFs, Word, Excel, and PowerPoint files natively. It simplifies adding dates, filling forms, and editing PDFs without needing advanced script troubleshooting.

  1. 1. Download WPS Office: Visit the official WPS website and download the free version for your Mac or PC.
  2. 2. Open Your PDF: Launch WPS Office and click 'Open' to load your PDF document or form.
  3. 3. Fill and Edit: Use the 'Fill & Sign' or 'Edit PDF' tools to easily insert dates, text, and signatures without writing code.
Seamlessly edit, annotate, and fill PDF forms without complex JavaScript configurations.Fully compatible with Microsoft Office formats (Word, Excel, PowerPoint) and standard PDFs.Lightweight software that runs smoothly on Windows, Mac, and Linux.Free to download and use, saving you money on expensive PDF editor subscriptions.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my PDF JavaScript work in Acrobat but not in Reader?

Acrobat DC is a full authoring tool with elevated privileges, whereas Adobe Reader restricts certain JavaScript executions for security reasons. Additionally, Reader may have JavaScript disabled by default or blocked by its 'Protected Mode' sandbox.

How do I add an automatic date to a PDF without using JavaScript?

Without JavaScript, you cannot dynamically populate the current date when a PDF is opened. However, you can use standard PDF editing software to manually insert a date stamp or use a 'Fill & Sign' text box before saving the document.

Are document-level scripts better than page-action scripts in PDFs?

Yes, for initialization tasks like setting the current date. Document-level scripts run as soon as the PDF is loaded, while page-action scripts (like 'Page Open') can be inconsistent, bypassed, or blocked depending on the PDF viewer configuration.

Can Protected Mode in Adobe Reader break PDF forms?

Yes. Protected Mode runs Adobe Reader in a restricted environment to protect your computer. This sandbox can block complex JavaScript from executing properly, preventing automated form fields and calculations from functioning.