How to make a PDF searchable, in one command
97.9%
of words a search found, after one command
Have us do it, first page free
Four free steps
-
Install. Here: Tesseract from Homebrew, then
uv tool install ocrmypdf. Other systems. - Run.
ocrmypdf in.pdf out.pdf -
Crooked or sideways pages? Add
--rotate-pages --deskew. - Test. Open out.pdf and search for a word you can see.
A picture becomes text
| Run | Words found | Size |
|---|---|---|
| The scan as is | 0 | 8.2 MB |
ocrmypdf in.pdf out.pdf |
2,537 | 8.1 MB |
tesseract pages/list.txt out pdf |
2,538 | 8.2 MB |
Tesseract takes page images, one per line in list.txt.
OCRmyPDF takes the PDF.
Tilted or turned pages: add a flag
| Pages | No flag | With the flag |
|---|---|---|
| Tilted 3 degrees | 68.3% | 97.7%, --deskew |
| Turned 90, 180 or 270 degrees | 30.0% | 97.8%, --rotate-pages |
- On the straight scans, both flags together cost one word, and the file shrank from 8.2 to 5.9 MB.
-
--deskewhas limits: in a first draw, one tilted page stayed blank with it. When --deskew fails.
Already has text? Exit 6
PriorOcrFoundError: page 1 already has text! - aborting
A typed PDF stopped too. A search already found all 885 of its words.
| Flag | Exit | Words found |
|---|---|---|
| none | 6 | Stopped |
--skip-text |
0 | 2,537 |
--redo-ocr |
0 | 2,537 |
--force-ocr |
0 | 2,537 |
Amounts: a search can miss them
I searched a made-up statement with a scan look for its 18 amounts, digit for digit.
| Run | Amounts found |
|---|---|
| The scan as is | 0 of 18 |
ocrmypdf |
16 of 18 |
ocrmypdf --deskew |
17 of 18 |
tesseract on the image |
17 of 18 |
No run found the opening balance, 1,248.37. One run read it as
4,248. 37. So no hit does not prove a number is not
there.
Our service checks statement totals to the cent.
Need the text, not a PDF?
PDF OCR to Markdown, our Apify Actor, reads scanned PDFs and returns Markdown text for $0.006 a page. It does not return a searchable PDF.
Questions people ask
Does OCR change how the pages look?
Not with plain ocrmypdf: it kept all 12 page images byte for byte. --deskew and --force-ocr saved new page images.
Can Tesseract make a PDF searchable by itself?
From page images, yes. Given the PDF, it stopped with exit 1: Pdf reading is not supported.
How do I check a PDF has a text layer?
Run pdffonts in.pdf. Our scan listed no fonts. After ocrmypdf, it listed one.
Method, limits and sources
How I tested it
12 printed book pages from 8 Wikisource books, each page checked by two people. A seeded shuffle picked them, not me. I left out a hand-lettered manuscript.
I read each PDF with pdftotext, the text layer a viewer's search reads. A word counts in any case, once per use. A word split by a line-end hyphen counts as missed.
Turned pages: 4 each at 90, 180 and 270 degrees. One run per setting, so no times. Scripts and results are in research/bench/make-pdf-searchable-2026-11-03/.
What I did not test
- Windows, Linux and Docker.
- Handwriting, and languages other than English.
- PDF/A output: Ghostscript is not installed here.
- Acrobat and online converters.
Versions and sources
- OCRmyPDF 17.13.0 (MPL 2.0) and Tesseract 5.5.3, on one Mac.
- Poppler pdftotext and pdffonts 26.03.0.
- OCRmyPDF cookbook
- Page scans and text: Wikisource.
- We make the Apify Actor. The other tools are open source, and we do not make them.
Two ways to skip the work
Run it yourself. Our Apify Actor turns scanned PDFs into Markdown, tables included.
Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.