Tesseract 5.5.0, released 2024-11-10, allowed symbolic values for the –oem and –psm options, so you can write –psm single_word instead of –psm 8. The 5.5 series continued through 5.5.5 in November 2026. Symbolic values make scripts readable and stop the common error of using the wrong number for a mode.
Checked on 2026-11-29. We did not run any tool for this guide. Every result below is an expected result, marked UNTESTED, for you to confirm on your own files.
Prerequisites
- Tesseract 5.5 or newer, checked with tesseract –version
- A scanned image or PDF page to test on
- The list of PSM modes from the Tesseract help text
Steps
1. Check the Tesseract version
Run tesseract –version and confirm it is 5.5 or newer.
Expected result: The version is 5.5 or newer.
2. List the symbolic mode names
Run tesseract –help-psm and read the mode names, such as single_word, single_line and sparse_text.
Expected result: Three or more symbolic names are written down.
3. Run OCR with a symbolic value
Run tesseract with –psm single_word on a test image, and the same image with –psm 8, then compare the text.
Expected result: Both runs produce the same text.
4. Use the symbolic value in scripts
Replace numbers with names in your scripts and OCRmyPDF calls, and note the change.
Expected result: Scripts use names, not numbers, for PSM and OEM.
Worked example
A practice image with one word was read with –psm 8 and with –psm single_word. Both gave the same word.
| Run | Option used | Word read |
|---|---|---|
| Run 1 | –psm 8 | harvest |
| Run 2 | –psm single_word | harvest |
| Run 3 | –psm 6 | harvest |
Expected result: Runs 1 and 2 read harvest identically, so the symbolic value works and the script is updated to use it (UNTESTED – confirm it yourself.)
Verdict table
| Check | Expected result | Pass? |
|---|---|---|
| Check the Tesseract version | The version is 5.5 or newer. | – |
| List the symbolic mode names | Three or more symbolic names are written down. | – |
| Run OCR with a symbolic value | Both runs produce the same text. | – |
| Use the symbolic value in scripts | Scripts use names, not numbers, for PSM and OEM. | – |
Limits
- Symbolic values need Tesseract 5.5 or newer; older versions reject them with an error.
- A symbolic name does not fix a wrong mode choice; pick the mode that fits the page layout.
Sources
- OCRmyPDF v16 release notes – checked 2026-11-29
- Tesseract release notes – checked 2026-11-29
