Publié
How to Find Text Inside Your PDFs and EPUBs
Whether you can search inside a document comes down to one thing: does the file have a real text layer. EPUB always does. A PDF only does if it was born digital, or has been through OCR. Here's what's actually happening when you tap the search icon, and how to fix a scan that comes up empty.
Quick answer
Whether you can search inside a document comes down to one thing: does the file have a real text layer. An EPUB always does — its body is built from XHTML markup, the same structured text a web page is made of, so there's nothing to extract. It's already text. A PDF only has a text layer if it was born digital (exported from a word processor, say) or has been through OCR. A scanned page with no OCR pass is just a photograph. Every word on it is a pixel, not a character, and search has nothing to match against.
That distinction explains almost every "why can't I find this word" moment. Below: what's actually happening when you tap the search icon, what changes the results, and how to fix a scan that comes up empty.
Step-by-step
What "search" is actually matching against
A search box doesn't look at the page the way you do. It scans the document's extracted text stream for your query and returns the matching ranges. On iOS, PDFKit's search methods work exactly this way: findString runs a synchronous pass and returns the first hit, beginFindString runs asynchronously and reports every match as it finds them, and each result comes back as a selection object an app uses to highlight the text and scroll to it. None of that touches the rendered page image. It's reading the text stream underneath.
Options that change what counts as a match
Two settings shape the result list. Case-insensitive search ignores capitalization, so "Reading" and "reading" both match. Whole-word search matches complete words only, so a search for "read" won't also surface "reading" or "already" — handy when the term you're after is short or common.
Common problems and fixes
"I searched and got zero results"
The most common cause: the file is a scan — a photograph of a page — with no OCR pass behind it. The words are visible, but there's no extractable text, so search has nothing to compare against. It isn't a bug. There's genuinely nothing there yet. (More on what OCR is and when you actually need it in our guide to OCR.)
Fixing it with OCR
OCR recognizes the character shapes in a scan and writes a hidden text layer positioned exactly under the original page image. The page looks identical — same photograph, same layout — but now has real, selectable, searchable text sitting invisibly beneath it. Scan quality matters for accuracy: a sharper scan, and the correct document language set before recognition runs, both meaningfully improve the result.
Doing this in Margina
Margina searches whatever you open — PDF, EPUB, Word, plain text — the same way, on-device, without uploading the file anywhere or creating an account. If a document already has a text layer, search finds it instantly. If it's a scan with none, Margina says so plainly rather than pretending it can search text that isn't there; you'd need to run OCR on it elsewhere first. That matters more than it sounds for a dense academic PDF, since those are almost always born-digital and already searchable the moment they land on your phone.
If this is the kind of thing you read on your phone, Margina is a free download on the App Store and Google Play.
Frequently Asked Questions
Why can't I search text in a PDF I scanned myself?
A scanned PDF is a photograph of a page, not text — there's nothing for a search function to match against until OCR (optical character recognition) runs over it and writes a hidden, searchable text layer under the image. Until then, every word is a pixel, not a character.
Is EPUB always searchable, even without OCR?
Yes. EPUB body text is XHTML markup — the same kind of structured, plain text a web page is built from — so it's already extractable the moment the file is opened. There's no scanning or recognition step involved, which is also why EPUB text reflows across screen sizes.
What's the difference between search and Find in Page?
In a single open document they're the same thing: a scan of that file's extracted text for a matching string. "Full-text search" usually refers to searching across many documents at once, which needs a pre-built index rather than a live scan — useful for a library, unnecessary for one open PDF.
Does search work the same on scanned library books, like on the Internet Archive?
The mechanism is identical — it depends on OCR'd text existing before a query can find anything. The Internet Archive runs OCR across its scanned collection specifically so its search-inside-a-book feature has something to match against.