Compress a local PDF
abox_pdf_compressCompress PDF files by recompressing embedded images with presets that trade resolution and quality for smaller size. Keeps page layout and reports actual savings.
Instructions
Recompress supported PDF images and rewrite structure using the existing abox.tools engine. Presets trade image resolution and quality for size. Keeps page content streams and verifies page order and geometry; image pixels can change. Reports actual savings and may produce a larger file. No byte-target search. Writes a new unencrypted PDF; signatures become invalid.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>",
"output_path": "<output_path>"
},
"name": "abox_pdf_compress"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpi | No | Optional resolution override. Zero disables image downsampling. | |
| preset | No | screen | |
| quality | No | ||
| input_path | Yes | Absolute local filesystem path. URLs and network shares are refused. | |
| output_path | Yes | Absolute local filesystem path. URLs and network shares are refused. | |
| strip_metadata | No |