OCR for scanned documents and handwriting¶
Scans are where classic OCR struggles: skew, stains, faded type, handwriting in the margins. ReadAnyDoc reads scanned pages with a vision model, checks the result against local OCR, re-reads doubtful strips zoomed in, and sends handwritten pages to a stronger model. Characters it cannot read are marked [illegible] instead of guessed.
import readanydoc
result = readanydoc.parse("scan.pdf")
print(result.markdown)
for w in result.warnings:
print("check:", w)
Tips¶
- See a faded 1904 invoice read end to end in Real documents.
- Handwritten pages go to Claude Sonnet 5.5 by default;
handwriting_model=Nonekeeps them on the main model. - Install Tesseract (
brew install tesseractorapt install tesseract-ocr) for the best results on scans.
Next¶
- See two real documents end to end, with every citation drawn on the page
- Extract guide and Parse guide
- Already on Reducto? Switch in one URL
- Questions: GitHub Discussions