pdf_compress
Reduce PDF size by re-encoding embedded images. If the compressed file isn't smaller, the original is returned unchanged.
Instructions
Compress PDF. Make a PDF lighter by re-encoding the images inside it. If the result is not meaningfully smaller, you get the original back — untouched. Accepts application/pdf, .pdf; up to 100 MB per file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Paths to the files to process, absolute or relative to the working directory. | |
| preset | No | How hard to squeeze. «For screen» is the lightest, «for print» keeps the most detail | ebook |
| grayscale | No | Convert to greyscale. Helps a lot with scans and hurts nothing if there was no colour | |
| outputDir | No | Where to put the results. Defaults to the folder each source file came from. Existing files are never overwritten. |