Utilities
OCR text from an image or scanned page
Optical character recognition from one image. Distribute the node for many.
overview
What tesseract does
You have a PNG, JPEG, or TIFF of a page, and the next node needs the printed words. Connect the image to input. The wrapper calls tesseract, writes base.txt, and copies that file to the exact Hive output path. -l selects the language (default eng in the image). --psm and --oem tune page segmentation and the engine.
Leave the hidden output port disconnected. Hive already appends the output path as the last argv. Connecting leftover booleans or a second output path will confuse the wrapper.
tesseract reads pixels. It does not extract a PDF text layer. Use pdftotext when the PDF already has text. A tiny or noisy image can return garbage or an empty string. Treat that as a failed read, not a blank document.
use cases
Where tesseract fits
OCR one screenshot
Connect the image to input. The output file is the recognized text.
Set the language
Pass -l eng or another trained language packaged in the image.
Tune page segmentation
Set --psm when the default mode splits a single line or a sparse poster badly.
OCR many images
Distribute the node. Each shard is one image to one text file.
reference
tesseract inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| input | FILE | · | Input image file. |
| lang | STRING | -l | Language code such as eng. |
| psm | STRING | --psm | Page segmentation mode (0-13). |
| oem | STRING | --oem | OCR engine mode (0-3). |
Showing key inputs. tesseract exposes 5 inputs in total.
Full flag reference (5 inputs)
| Name | Type | Flag | Description |
|---|---|---|---|
| input | FILE | · | Input image file |
| output | STRING | · | Output file path (without extension) |
| lang | STRING | -l | Language(s) for OCR (e.g., eng, fra, deu) |
| psm | STRING | --psm | Page segmentation mode (0-13) |
| oem | STRING | --oem | OCR engine mode (0-3) |
example
Run tesseract
tesseract hello.png /hive/out/helloHELLOguidance
Choosing tesseract
Use tesseract when the page is an image. Use pdftotext when the PDF already has a text layer.
pdftotext
Extracts a PDF text layer. Use it before OCR when the file is a born-digital PDF.
trafilatura
Extracts article text from HTML, not from an image.
ffmpeg
Can render a video frame to an image. It does not OCR.
faq
tesseract questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run tesseract yourself
A fixture PNG of HELLO feeds tesseract. The text below is from a completed run.
Facts on this page come from the live Trickest tool library.