How it decides
The engine uses each image's displayed size on the page to decide whether to resample it. Choose a profile for screen, email or print, then inspect the output with representative files. The response reports original and output bytes, pages, images processed and whether the original was returned. See the photo report integration guide for the size calculations and a proposed acceptance checklist. For request code in Node.js and Python, with retries and the job wait, read compress a PDF from Node.js and Python.
Target a size, not a guess
If your real constraint is an email attachment limit, say so directly:
{
"source": { "url": "https://example.com/report.pdf" },
"options": { "max_base64_bytes": 28000000, "output": "base64" }
}
The engine tries quality and resolution settings above its configured quality floor. A target can
remain unmet: check stats.target_not_met. Padded base64 has 4 * ceil(bytes / 3) characters,
before message headers, line wrapping or other attachments. Budget for the complete payload.
Safe by default
Detected signatures and PDF/A or PDF/X declarations are rejected by default. These checks do not replace a signature or conformance validator. Do not override them without deciding whether you need a signed record, a compliant archive or a separate delivery copy.
Read the endpoint reference and signed PDF error guide before connecting a production workflow. Some accepted advanced fields are not consumed by the current native engine; this page does not promise font subsetting, JBIG2 or SSIM verification.