What this covers
- Search reads characters, not words or meanings
- A scan has no characters at all, so search finds nothing ever
- Ligatures and hyphenation cause real, reproducible misses
- Your operating system can search every PDF at once, if they have text layers
Search is the single best reason to keep course material as PDFs rather than as printouts. It is also the feature that most often appears broken, and every way it fails comes from one fact: it matches characters in the text layer, and nothing else.
What search is doing
The reader takes the characters stored in the page's content stream, joins them into a string, and looks for your term in it. That is the whole operation. It is not reading the page, not recognising words and not understanding anything.
So the question 'why did my search fail' is always the same question: were the characters you searched for actually in the file, in that order?
The two-second test before you debug anything
Try to select a word with your cursor. If it highlights, there are characters and search should work. If the cursor sweeps across as though over a photograph, the document is a scan, there are no characters, and no search will ever find anything in it.
Failure one: it is a scan
By far the most common. A scanned document is a photograph of a page. The letters are pixels arranged in a shape you recognise, and the file contains no text whatsoever.
This catches people repeatedly because a scan looks identical to a generated PDF on screen. Nothing about the appearance tells you. Only selection does - or running text extraction, which will report how many pages produced no text.
Failure two: ligatures
Good typesetting replaces certain letter pairs with a single combined glyph: fi, fl, ffi. In a well-made PDF those are stored as the ligature character, not as two separate letters.
Search for 'final' and the reader looks for f, i, n, a, l. The document contains the ligature, then n, a, l. No match. This is real and reproducible on typeset academic material, and it is why a search that obviously should succeed sometimes does not. Searching for a fragment that avoids the pair - 'nal' - finds it.
Failure three: hyphenation and line breaks
A word broken across two lines is stored as two pieces with a hyphen. Search for the whole word and it is not there, because in the file it genuinely is not.
Some readers compensate; most do not. Searching for the first half of the word is the workaround.
Why a search failed
In order of likelihood.
| Symptom | Cause | What to do |
|---|---|---|
| No search ever finds anything | Scanned document, no text layer | Nothing here helps; only OCR would |
| A word you can see is not found | Ligature in the word | Search a fragment avoiding fi, fl or ffi |
| A word at a line end is not found | Hyphenated across the break | Search the first half |
| Search finds it in the wrong place | Text layer from OCR, imperfectly positioned | Expected; the layer is a machine's guess |
| Two-column results in odd order | Reading order inferred from positions | Extract with block layout preserved |
Tools that help
Searching a whole folder at once
Both major desktop operating systems index the text layer of PDFs, so searching for a phrase finds every document in your folder that contains it. This is enormously useful and almost nobody realises it is available.
On macOS, Spotlight indexes PDF text automatically. On Windows, Search indexes PDFs if the folder is included in indexing options. On both, scanned documents are invisible, for the reason above - which means a folder that is half scans gives you half the answer without telling you.
Searching your whole past-paper folder
Useful for finding every occurrence of a topic across six years.
- Confirm the folder is indexed
On Windows, add it in Indexing Options. On macOS it happens automatically unless the folder is excluded in Spotlight privacy settings.
- Search for vocabulary, not topic names
Questions rarely say 'projectile motion'. They say 'projected horizontally' and 'time of flight'. Search what the questions are made of.
- Check which results are missing
If a paper you know covers the topic does not appear, it is probably a scan. Open it and try to select a word.
- Extract to text for a reliable search
Converting a folder of mark schemes to plain text makes them searchable with any tool, including ones that do not understand PDFs.
Getting search to work for you
- Check for a text layer before concluding search is broken
- Search fragments when a word contains fi, fl or ffi
- Search the first half of a word that might be hyphenated
- Extract mark schemes and specifications to text for reliable searching
- Know which of your documents are scans, because they are invisible to every search
Questions and answers
Why does search find nothing in my past paper?
Almost certainly because the paper is a scan. It contains an image of text rather than text. Try to select a word: if you cannot, there is nothing there for any search to find.
Why can I see a word on the page but not find it?
Ligatures are the usual cause: 'fi' and 'fl' are often stored as a single combined character, so searching for the two letters separately does not match. Search a fragment that avoids the pair.
Can I search several PDFs at once?
Yes. Spotlight on macOS and Windows Search both index PDF text layers, so a search across a folder finds every document containing a phrase. Scanned documents are invisible to both.
Is the search in the reader here different?
It works the same way - it reads the text layer - and it reports how many matches were found on how many pages, which the built-in readers generally do not.