← All microservices
PDF compressor
PDF
Make a PDF smaller by downsampling its images. Choose how far: screen (smallest), ebook, printer or prepress.
What it does
- Four levels, from screen to prepress
- Grayscale for extra savings
- Duplicate images stored once
- Original returned if it cannot shrink
Good for
- Email size limits
- Upload portals
- Archiving scans
Made for scanned documents and image-heavy PDFs. Text-only PDFs are usually small already.
Example
POST https://bloodweb.net/api/v1/pdf-compress
curl -H "Authorization: Bearer YOUR_KEY" -F file=@scan.pdf -F level=ebook https://bloodweb.net/api/v1/pdf-compress -o smaller.pdf
Options
| Name | Description |
|---|---|
filefile |
The PDF, up to 50MB. |
level
|
screen: images at 72 DPI, smallest. ebook: 150 DPI, good for email. printer: 300 DPI. prepress: 300 DPI, colour kept for print shops. One of: screen, ebook, printer, prepress Default: ebook |
grayscale
|
Convert everything to shades of grey. Often halves a scanned colour document again. Default: false |
Returns
The smaller PDF, with X-Original-Bytes and X-Output-Bytes. If it would not get smaller, the original comes back with X-Kept-Original: true.