ocrmypdf-optimize
Installation
SKILL.md
OCRmyPDF — Optimization Guide
Overview
OCRmyPDF provides extensive optimization options to reduce file size, create PDF/A archival documents, and configure output quality.
For core OCR functionality, see the ocrmypdf skill. For image processing (deskew, rotate, clean), see ocrmypdf-image. For batch/Docker/scripting, see ocrmypdf-batch.
Compression Levels
# Level 0 — no optimization (fastest)
ocrmypdf --optimize 0 input.pdf output.pdf
# Level 1 — lossless (default)
ocrmypdf --optimize 1 input.pdf output.pdf
# Level 2 — lossy (aggressive)
ocrmypdf --optimize 2 input.pdf output.pdf