How Does OCR Turn a Scan into Searchable Text?
Rendering PDF pages, recognizing characters, and placing a text layer
The browser renders each selected PDF page to a canvas, then Tesseract.js analyzes the image and returns recognized words with position data. For supported Latin-script languages, the tool places an invisible text layer over the original page so text can be selected and searched.
- Page Rendering: PDF.js renders each selected page to an image canvas for OCR analysis.
- Character Recognition: Tesseract.js identifies text and returns word positions and confidence values.
- Searchable Text Layer: PDF-Lib adds recognized text over the original page for supported languages; plain-text export is available for all languages listed in the selector.