pdf_compress
Reduce PDF file size by rebuilding the document structure, removing orphaned objects, and optionally stripping metadata.
Instructions
Attempt to reduce PDF file size by rebuilding the document structure. Copies all pages to a fresh PDF (dropping orphaned objects), and optionally strips metadata. Results vary — works best on PDFs with accumulated edits or orphaned data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | PDF file path | |
| outputPath | Yes | Output path | |
| flattenForms | No | Flatten form fields to reduce size (default: false) | |
| stripMetadata | No | Remove title, author, subject, keywords (default: false) |