How to find and remove hidden scripts from a PDF
Some PDFs carry small programs that run when the file opens or when a field changes. This guide checks what a file contains, removes the scripts and leaves the visible pages as they are.
Removing scripts also switches off automatic calculations in form fields. If the form needs to add up numbers, keep an untouched copy.
Step by step
Check the file first
Open the quality report tool and choose the PDF. It lists pages, size, text, images and fonts, gives a score and shows suggestions. The report runs in your browser.
Remove the JavaScript
Open the remove JavaScript tool and start it. All scripts and automatic actions are taken out. The pages look the same and the work happens on your device.
Sanitise when you need more
To also clear metadata, embedded attachments and form fields, run the sanitise tool on the result. The visible pages stay.
Read the report again
Run the quality report on the new file to confirm that it still opens and has the pages you expect.
Share the clean copy
Send the clean file and keep the original in a safe place. The original is never changed by these tools.
Tools used in this guide
Questions about this task
- Will my form still work?
- Fields stay, but automatic calculations and checks stop working because they depend on scripts. Keep a copy if you still need them.
- What does sanitising remove?
- JavaScript, metadata, embedded attachments and form fields. The visible pages remain.
- Does the file leave my device?
- The quality report and the JavaScript removal run in your browser. Sanitising runs on a secure server and the file is deleted after the result is sent.