ocring-pdfs
Installation
SKILL.md
OCRing PDFs
ocrmypdf writes an invisible text layer over the original page images, so the
output file is both the scan you can look at and a document pdftotext, grep,
and pdfplumber can read. Rasterize-then-tesseract gives you a .txt divorced
from the pages; page numbers and coordinates are gone.
The toolchain is not in the base container. It installs in 18 seconds (measured 2026-09-12: apt 3s, pip 15s), so install it when a scan shows up rather than carrying it in a container layer.
Probe before installing
pdftotext in.pdf - | tr -d '\f \n' | wc -c