docs/tools/sanitize-pdf.md
PDFs can carry far more than what you see on screen. Hidden metadata, embedded JavaScript, file attachments, form data, and layer information can leak sensitive data or pose security risks. Sanitizing strips all of it, leaving you with a clean document safe to share publicly.
All options are enabled by default. Uncheck any you want to preserve.
| Option | What It Removes |
|---|---|
| Flatten Forms | Converts interactive form fields into static content |
| Remove Metadata | Strips author, title, creation date, software info, and XMP data |
| Remove Annotations | Deletes comments, highlights, sticky notes, and markup |
| Remove JavaScript | Eliminates embedded scripts that could execute on open |
| Remove Embedded Files | Strips file attachments embedded within the PDF |
| Remove Layers (OCG) | Flattens optional content groups into a single layer |
| Remove Links | Strips hyperlinks and URL references |
| Remove Structure Tree | Removes the document structure used for accessibility tagging |
| Remove MarkInfo | Strips marked content information |
| Remove Fonts | Removes embedded font data (use with caution) |