pdf_sanitize
Remove invisible threats from PDF files: JavaScript, auto-actions, form fields, annotations, and embedded files. Rewrites the file from reachable objects to eliminate orphaned data.
Instructions
Strip the invisible parts of a PDF (local path) before handing it out: JavaScript, open-actions and auto-actions, form fields, annotations and embedded files. The file is rewritten from its reachable objects afterwards, so orphaned remains are gone too – deleting references alone leaves them readable in the byte stream. The counterpart to pdf_redact: redact removes visible text, sanitize removes hidden payload. $0.01.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| flatten | No | Flatten annotations and form fields into the page | |
| output_path | No | ||
| idempotency_key | No | ||
| remove_metadata | No | Also clear title, author and producer | |
| remove_attachments | No |