How to Disable or Remove Document-Level JavaScript in PDFs
Question details
The user needs to disable or permanently remove document-level JavaScript embedded in PDF files to stop unwanted automated actions like automated printing.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Opening PDF files or attempting to run bulk processing actions on multiple PDF documents.
- Observed behavior
- Disruptive document-level JavaScript prompts or automated printing commands execute unexpectedly when accessing the files.
Ensure you have administrative or editing permissions for the PDF files you intend to modify. Creating a backup folder for the original PDF documents before running any bulk script removal operations is highly recommended.
Disable JavaScript globally in PDF preferences
This prevents any JavaScript from running automatically when you open PDF documents, immediately stopping disruptive prompts.
By disabling global JavaScript settings, you prevent the document-level scripts from executing upon launch. This is the fastest way to view files without interruption.
Open your software and navigate to 'Edit' > 'Preferences' on Windows, or the 'Acrobat' app menu > 'Preferences' on a Mac.
Select the 'JavaScript' category located in the left-hand navigation pane of the Preferences window.
Uncheck the box labeled 'Enable Acrobat JavaScript' to stop all automated scripts from executing globally.
Click 'OK' to apply your new security settings. The disruptive prompts will no longer appear when you open your PDF files.

Programmatically remove scripts using Action Wizard
Best for bulk processing, allowing you to strip specific scripts across multiple PDFs so they can be processed and printed later.
Securely read, manage, and edit PDFs with WPS Office
WPS Office provides a robust, lightweight PDF reader and editor that prioritizes your document security. Effortlessly manage your PDF files seamlessly within an all-in-one office suite that securely handles Word, Excel, PowerPoint, and PDF files.
- 1. Install WPS Office: Download and install WPS Office from the official website.
- 2. Launch WPS PDF: Open the application and select 'PDF' from the welcome screen.
- 3. Open your document: Load your PDF document; WPS PDF will securely open the file for reading and analysis.
- 4. Manage securely: Use the 'Edit' or 'Print' tabs to safely manage and output your documents without disruptive automated prompts.

Frequently Asked Questions
Why do PDFs have document-level JavaScript?
JavaScript is embedded in PDFs to create interactive forms, validate data inputs, automate repetitive tasks like bulk printing, or display custom alert messages upon opening the document.
Can I re-enable JavaScript after processing my files?
Absolutely. You can return to the Preferences menu at any time and re-check the 'Enable Acrobat JavaScript' option to restore interactive functionality for your trusted PDFs.
Is it safe to run automated scripts from unknown PDFs?
No, executing JavaScript from unverified or unknown sources can pose a security risk. If you are unsure about a document's origin, it is recommended to keep JavaScript disabled or view the document using a secure, lightweight PDF reader.




