compress_pdf
Reduce PDF file size by selecting low, recommended, or extreme compression levels.
Instructions
Reduce the file size of a PDF. Choose compression_level "low", "recommended" (default), or "extreme". Outputs a .pdf file on disk and returns its path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_file | Yes | Path to the PDF file to compress. | |
| output_path | No | Optional output path. If it ends with the expected extension, the file is written there. If it is a directory, the file is placed inside with a timestamped name. Defaults to the same directory as the first input. | |
| compression_level | No | Compression strength. "extreme" yields the smallest file but may lose quality. | recommended |