Tesseract OCR
Open-source OCR engine with a command-line program that turns images of text into plain text, TSV, hOCR or searchable PDF.
What is known from testing
On 2026-10-11, the headlesson operator ran all 8 steps of this lesson with Tesseract OCR 5.5.1 (macOS26.5.2 arm64; Homebrew tesseract 5.5.1 and tesseract-lang 4.1.0 already installed (not reinstalled; upstream latest is 5.5.3); poppler 26.04.0 for pdftoppm; self-made text page only), and all passed. The final Next step is advice and was not run. No independent check has been reviewed. This is the operator's own run, not a vendor claim.
- Test record: test:djrmwhe — 2026-10-11, 5.5.1, passed
Independent check
Independent check: not yet reviewed. (Whether an independent check exists has not been looked up for this record.)
Description
Tesseract is an open-source OCR engine provided as the libtesseract library and a tesseract command-line program. It reads images such as PNG, JPEG and TIFF and writes plain text, hOCR, PDF, TSV, ALTO or PAGE output. Recognition needs trained language data files, and the project itself has no graphical interface.
Current lesson
Goal: Render a self-made text page to a PNG, OCR it with tesseract and check the recognized text.
This is the current lesson. The test record above was run on the lesson as it was at its own revision; they can differ.
- 1. command -v tesseract || brew install tesseract
- 2. tesseract --version
- 3. tesseract --list-langs
- 4. printf 'Invoice 2026-001\nTotal: 42 apples\n' > note.txt
- 5. cupsfilter -m application/pdf note.txt > note.pdf
- 6. pdftoppm -r 300 -png -singlefile note.pdf scan
- 7. tesseract scan.png out -l eng
- 8. grep -c 'Total: 42 apples' out.txt
Next (advice, not tested): Next: Agree with the user on the real images, their languages and the output format; check that the language codes appear in tesseract --list-langs, OCR one page with -l <lang> (add tsv to get word confidences), and compare a sample of the text with the image before processing the rest.
Cautions recorded with the lesson
These notes come from the lesson. Some describe failures seen in tests; others are general cautions. Each one is not a separately tested result.
- The Homebrew tesseract formula contains only the eng and osd language data; other languages need brew install tesseract-lang.
- An unavailable language (for example -l xxx) printed "Failed loading language" and exited 1 in the test; check tesseract --list-langs first.
- The second argument is an output base name; tesseract scan.png out writes out.txt. Pass - as the output base to print to standard output.
- Low-resolution input is misread without an error; a 50 dpi render gave "Inyatce 2026" and exit 0 in the test, while a 300 dpi render was read correctly. Check the text, not only the exit code.
- Appending the config names tsv, hocr or pdf selects word-level TSV with positions and confidence, hOCR, or a searchable PDF with a text layer.
- Steps 4 and 5 use macOS cupsfilter and poppler's pdftoppm only to make a test image; any PNG of printed text works as input.
- Confirm: Check which images are read, which language data is used and where the output file is written (an existing out.txt is replaced), and spot-check the OCR text against the image before passing it to a downstream step.
How to start
- cli tesseract: install
brew install tesseract; checktesseract --version; auth: None for local images.; docs: https://tesseract-ocr.github.io/tessdoc/Command-Line-Usage.html
Where each of these values comes from is listed per field under Sources (/interfaces/N/field).
Compared facts
- license: Apache-2.0 (checked 2026-10-11, primary, official; source: https://github.com/tesseract-ocr/tesseract)
- open_source: true (checked 2026-10-11, primary, official; source: https://github.com/tesseract-ocr/tesseract)
- pricing: free (checked 2026-10-11, inferred, editorial; source: https://github.com/tesseract-ocr/tesseract)
- has_human_gui: none (checked 2026-10-11, primary, official; source: https://github.com/tesseract-ocr/tesseract)
- non_interactive: true (checked 2026-10-11, primary, editorial; source: headlesson editorial judgement)
- machine_output: true (checked 2026-10-11, primary, official; source: https://github.com/tesseract-ocr/tesseract)
- local_mcp: unknown (not confirmed)
- remote_mcp: unknown (not confirmed)
- cli: true (checked 2026-10-11, primary, official; source: https://github.com/tesseract-ocr/tesseract)
- rest_api: unknown (not confirmed)
- auth: none (checked 2026-10-11, inferred, editorial; source: headlesson editorial judgement)
- self_hostable: true (checked 2026-10-11, primary, editorial; source: headlesson editorial judgement)
- embeds_llm: unknown (not confirmed)
- refusal_contract: unknown (not confirmed)
- audit_log: unknown (not confirmed)
- last_release: 2026-07-24 (checked 2026-10-11, primary, official; source: https://api.github.com/repos/tesseract-ocr/tesseract/releases/latest)
- ja_support: true (checked 2026-10-11, primary, official; source: https://github.com/tesseract-ocr/tessdata/blob/main/jpn.traineddata)
Sources
Each line names fields of this page (as JSON pointers into the .json version) and where they come from. Labels without a link are non-public sources. Fields not listed (such as test results) are the headlesson operator's own observations.
- /name, /axes/license, /axes/open_source, /axes/has_human_gui, /axes/machine_output, /axes/cli: https://github.com/tesseract-ocr/tesseract (checked 2026-10-11, primary, official)
- /one_liner, /description: https://github.com/tesseract-ocr/tesseract (checked 2026-10-11, primary, editorial)
- /lesson/goal, /lesson/next_advice, /lesson/cautions/items/5, /lesson/cautions/items/6, /interfaces/0/auth, /axes/auth, /relations/1: headlesson editorial judgement (checked 2026-10-11, inferred, editorial)
- /lesson/steps/0, /lesson/cautions/items/0, /interfaces/0/kind, /interfaces/0/name, /interfaces/0/install, /interfaces/0/verify, /interfaces/0/docs: https://formulae.brew.sh/formula/tesseract (checked 2026-10-11, primary, third-party)
- /lesson/steps/1, /lesson/steps/2, /lesson/steps/3, /lesson/steps/4, /lesson/steps/5, /lesson/steps/6, /lesson/steps/7, /lesson/cautions/items/1, /lesson/cautions/items/2, /lesson/cautions/items/3, /axes/non_interactive, /axes/self_hostable: headlesson editorial judgement (checked 2026-10-11, primary, editorial)
- /lesson/cautions/items/4: https://tesseract-ocr.github.io/tessdoc/Command-Line-Usage.html (checked 2026-10-11, primary, official)
- /axes/pricing, /relations/0: https://github.com/tesseract-ocr/tesseract (checked 2026-10-11, inferred, editorial)
- /axes/last_release: https://api.github.com/repos/tesseract-ocr/tesseract/releases/latest (checked 2026-10-11, primary, official)
- /axes/ja_support: https://github.com/tesseract-ocr/tessdata/blob/main/jpn.traineddata (checked 2026-10-11, primary, official)
Primary record
Test results here are the operator's own past lesson trials (legacy). They are not claimed to meet level L1 of run-task-contract/0.1.0.
Relations
- used-for: usecase:parse-documents-for-llm
- depends-on: app:poppler
Retrieve over MCP
headlesson_get id="app:tesseract" sections ["lesson","gotchas"] on https://mcp.headlesson.com/mcp
Cite
headlesson app:tesseract: see test record test:djrmwhe (https://headlesson.com/tests/djrmwhe).
Page updated: 2026-10-13 (the date its content last changed).
要約(日本語): Tesseract OCR。運営の試用(2026-10-11、5.5.1、passed)の記録がある。詳しい条件・限界・出典は本文のとおり。