OCR (Searchable PDFs)
Makes scanned PDFs and image files searchable by adding an invisible text layer with Windows' built-in OCR, without changing how the pages look.
OCR reads the words on each scanned page and places invisible text over them. The page looks exactly as it did, but its text can now be searched, selected, copied and extracted. Pages that already have text are left alone, and a PDF that needs nothing is copied byte for byte. A scanned page that carries only a little text, such as a Bates number stamped on the scan, is still read; the words under the existing stamp are left out so the stamp is not doubled.
Image files (TIFF, JPEG, PNG, BMP and GIF) become PDFs: one page per image, or per frame of a multi-page TIFF, at the image's own size. The tool uses the OCR engine built into Windows, so it works offline and no document leaves the PC. It reads the languages whose Windows OCR language pack is installed.
Use it when
- Extract Text or Search reports PDFs that have no text layer and need OCR.
- You have received scanned documents or a TIFF production and need to search them.
- You are preparing a production or court book that should be searchable.
How to run it
- Choose the folder of scanned PDFs and images as Input.
- Choose an Output folder outside the input folder.
- Leave language empty to read Windows' display language, or enter another installed language such as
fr-FR. - Leave Resolution (dpi) at 300 unless the print is very small.
- Click Run. The notes say which language was used and how many pages were read.
- Click Open report and check the Status and PagesNoTextFound columns.
- Check a few important documents by searching them for words you can see on the page.
Settings
Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help ocr lists them.
Settings
| Setting | What it does | Type and default |
|---|---|---|
Language--language |
The language to read, e.g. en-GB, fr-FR or de-DE. Empty (default): Windows' display language. Other languages need their Windows OCR language pack: Settings > Time & language > Language & region > add the language (with its optical character recognition feature). If Windows cannot read the chosen language, the run stops before it starts and lists the OCR languages that are installed. To add one: Settings > Time & language > Language & region, add the language, and include its optical character recognition feature. Characters outside the Windows-1252 set (for example Greek, Cyrillic or Asian scripts) are stored as ? in the searchable text; a note says how many pages this affected. |
text empty |
Resolution (dpi)--dpi |
How finely PDF pages are rendered for reading, 150-600 dots per inch. 300 (default) suits most scans; try 400 for very small print. Images are read at their own resolution. 150 to 600. Higher values can help with very small print but take longer. This applies to PDF pages only; images are read at their own resolution. |
number300 |
Check for turned pages--turned-pages |
When a page reads poorly upright, also try it turned 90°, 180° and 270° and keep the way it reads best, so sideways and upside-down scans become searchable too. The page itself is not turned. When a page reads poorly upright, it is also read turned 90°, 180° and 270°, and the best reading is kept. The page itself is not rotated. The Details column lists the pages that were read turned. |
yes/notrue |
Common settings
| Setting | What it does | Type and default |
|---|---|---|
Input required--input |
Folder (or single file) to read. It is opened read-only and never modified. | folder empty |
Output required--output |
Folder for reports. Must not be inside the input folder. Each run gets its own sub-folder. | folder empty |
Recurse--recurse |
Include sub-folders. | yes/notrue |
Extensions--extensions |
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. | list empty |
Parallelism--parallelism |
Files processed at once. Use 1-2 for spinning disks or network shares. | number4 |
What you get
Each run creates its own folder inside the output folder, with the report ocr.csv, errors.csv and manifest.json (see Run folders and manifests).
files\…: A PDF for every input file, in the same folders. PDFs keep their names; images get.pdf. If a name is already taken (for examplea.pdfanda.pngin the same folder), the later one gets a number, such asa_(1).pdf.ocr.csv: One row per file: Pages, PagesRead, PagesAlreadyText, PagesNoTextFound, Words, Status (OCRed,Already searchable (copied unchanged)orNo text found), Details, Destination and MD5.errors.csv: Files that could not be read, such as password-protected or damaged PDFs.
Report columns
RelativePathFileNamePagesPagesReadPagesAlreadyTextPagesNoTextFoundWordsStatusDetailsDestinationMD5SourcePath
Check the result
- Read the notes for the language used and the totals.
- Filter Status for
No text found, and look at PagesNoTextFound and Details for pages that were blank, pictures or unreadable. - Check
errors.csv. Remove passwords with Decryption and run OCR again on those files. - Open a sample and search for a few words you can see, especially on poor-quality, handwritten or very small text.
- Run Extract Text on the OCR output to get text files for the scanned documents.
- For an image with no usable resolution in its file, the page size assumes 200 dpi; the Details column says so.
- Scans that have already been Bates stamped can still be OCRed: the page is read and the existing stamp text is kept, not doubled.
- OCR reads printed and typed text well, but handwriting, faint copies and very small print may be missed or misread. Do not rely on a search of OCR text to prove a document does not contain a word.
- Adding a text layer changes the PDF, so OCRed files have different hashes from the originals. Keep the originals.
- The free edition processes up to 25 documents per run.
From the command line
The command line is part of LitTechKit Pro. See Command line.
ltk run ocr --input "D:\Matter\Scans" --output "D:\Matter\Searchable" --language en-GB --dpi 300
Related tools
- Extract Text: Extracts the text of PDF, Word, Excel, PowerPoint, email, RTF, HTML and text files into one UTF-8 .txt file per document, with page and sheet markers, and reports documents that need OCR.
- Keyword Search: Searches PDF, Word, Excel, PowerPoint, email and text files for keywords (with wildcards) or regular expressions. Reports every hit with context, hits per term, and files that could not be searched.
- Decryption: Removes known passwords from PDF, Word, Excel and PowerPoint files, writing unlocked copies and reporting which password number opened each file (the passwords themselves are never saved). Encrypted .docx/.xlsx/.pptx files are decrypted without Office, so the unlocked copy is the original document exactly.
- Bates Stamp: Stamps sequential Bates numbers and an optional legend (e.g. CONFIDENTIAL) on every PDF page, correctly placed on rotated and cropped pages, writing stamped copies with a Beg/End Bates report.