
Optical character recognition, or OCR, tries to identify written text from images. It can help extract a printed notice, invoice, document scan or photograph into editable text. Unlike copying text from a normal digital PDF, OCR must infer characters from pixels and can make mistakes.
The Code Deb Image and PDF OCR Tool processes JPG, PNG, WebP, BMP and short PDF documents locally in a browser, using Tesseract.js and English, Nepali or combined language models. It outputs plain text for editing, copying and download.
What the Nepali language model supports
The Tesseract project publishes Nepali (nep) trained data, including a fast LSTM model. The model can recognize Devanagari printed text, although success depends on scan quality, typography and the individual document. Proofread proper names, conjuncts, Nepali numerals and critical financial or legal values.
Why OCR of PDFs requires rendering
Tesseract.js does not natively recognize PDF files. The Code Deb tool uses PDF.js to render pages to canvases, then passes those rendered images to Tesseract. This works with scanned pages, but it can be slower than extracting an existing text layer. The current browser tool limits each run to six PDF pages.
Preparing a document for better recognition
- Use a sharp, upright image with clear, high-contrast text.
- Avoid harsh shadows, skewed scans and cropped lines.
- Choose English, Nepali or English plus Nepali according to the document.
- Run OCR and proofread the text in the editable results panel.
- Download TXT only after checking layout, numbers and names.
What OCR does not preserve
The tool extracts plain text. It does not preserve fonts, multi-column page positioning, tables, hyperlinks, form fields or an existing cryptographic signature. It does not create a searchable PDF. Handwriting recognition is not guaranteed and can be particularly unreliable on informal Nepali handwriting.
Privacy and download behavior
OCR runs on the local device. The engine, worker and trained data may be downloaded from CDNs on first use; the selected document bytes are not uploaded to Code Deb. On slower computers, large scans take longer to process and use more memory.