pdf_compress_size
Shrink a PDF from freedailypro to a size you need, such as under 2 MB for an email or a portal (the site's File size mode). The same steps as Balanced, Aggressive and Extreme, gentlest first, stopping at the first one that fits. If the goal cannot be reached it finishes every allowed step and returns the smallest file with targetMet: false and limitReason. limit caps how far it may go (balanced keeps text selectable). Heavy at the stronger limits; returns the best level so far (truncated: true) if the time budget runs out. A PDF already under the goal is returned unchanged.
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": {
"fileBase64": "<fileBase64>",
"targetSize": "<targetSize>"
},
"name": "pdf_compress_size"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How far the steps may go. Default extreme. balanced = text stays selectable; aggressive = pages may become pictures; extreme = greyscale and black-and-white too | |
| fileBase64 | Yes | The PDF, base64 encoded (up to 20 MB, up to 100 pages) | |
| targetSize | Yes | The size to reach: a number of bytes, or text such as 2MB or 500KB |