Datagrunt 4.6.21: OCR Runs Tesseract by an Absolute Path

November 1, 2026by Martin Graham

Datagrunt 4.6.21 changes how PDF OCR finds Tesseract. Upgrading is recommended for everyone who OCRs scanned PDFs.


What changed

When PDFReader or PDFWriter OCRs a scanned page, Datagrunt runs Tesseract through pytesseract. Until now that meant pytesseract’s default command, the bare name tesseract. From 4.6.21 (#413):

  • Absolute directories only: Datagrunt looks for tesseract only in the absolute directories listed in PATH (for example /usr/bin or C:\Program Files\Tesseract-OCR), and runs it by its absolute path. Relative PATH entries ("", ., bin) and the working directory are not searched.
  • Your setting is kept: if you set pytesseract.pytesseract.tesseract_cmd to an absolute path, Datagrunt uses it. A relative path there is not run.
  • No Tesseract found: OCR is skipped for the page and recorded as an “OCR failed” page warning, as when Tesseract is not installed. The rest of the page is kept.

Nothing else changes, and no code changes are needed. If Tesseract is installed in a standard location on PATH, OCR works as before.


Upgrading

uv pip install --upgrade datagrunt