Show HN: Tidy – a Mac app that names files by reading what's inside them

sdiazthomas1 pts0 comments

Why Spotlight cannot find text in your scanned PDFs, and what to do

tidy.

Writing

Why Spotlight cannot find text in your scanned PDFs

Sebastián Díaz Thomas · Santiago, Chile · August 2026

You search your Mac for a word you are certain appears in a document you scanned last year. Spotlight returns nothing. You try a different word. Still nothing. You start to wonder whether the file is corrupted, or whether the index needs rebuilding.

The file is fine and the index is fine. There is simply nothing in that document for Spotlight to read.

What a scanned PDF actually is

Two very different things are both called PDF.

A PDF that came out of Word, or a browser's Print to PDF, contains text as text . The characters are stored as characters. Spotlight reads them, indexes them, and finds them.

A PDF that came out of a scanner, a phone camera or a scanning app is a photograph of a page wrapped in a PDF container . There are no characters in it. There are pixels arranged in the shape of characters, which is a completely different thing to a computer.

Spotlight is not failing to read the words. There are no words. It indexed the file correctly and the file contains an image.

The thirty-second check

Open the document in Preview and drag your cursor across a line of text. If the words highlight, there is a text layer. If you just draw a rectangle over the page, there is not.

To check a whole folder at once, in Terminal:

for f in *.pdf; do<br>strings "$f" | grep -qm1 "/Type/Font" || echo "no text layer: $f"<br>done

A PDF that contains real text has font objects inside it. A photograph of a page has none, so anything this prints is a scan that no search on your Mac can read. Run it across your documents folder and count the lines. For most people the number is a surprise.

One caveat, so you don't trust it further than it deserves: some PDFs compress their internal structure and can be reported as having no text when they do. The Preview test above is the one that never lies. Use the command for a rough count, not for a verdict on a single file.

Fix 1: add a text layer to the file

This is the classic solution. An OCR program reads the image and writes the recognised text back into the PDF as an invisible layer sitting exactly over the picture of each word. The document looks identical and now behaves like a normal PDF: Spotlight indexes it, Preview lets you select and copy, and searching works everywhere on the Mac.

Most scanner software will do this if you turn the option on, and it is worth turning on before you scan the next thousand pages. Dedicated OCR applications do a better job on difficult originals.

The catch: it only helps files you process. The scans already sitting on your Mac stay invisible until you go back and run them all through, which is the kind of task that never happens.

Fix 2: extract the text yourself

macOS can read images natively. In the Shortcuts app there is an Extract Text from Image action that runs on your Mac, with no account and no upload — the same recognition that powers Live Text when you select words in a photo.

You can build a shortcut that takes an image and gives you back its text, then do what you like with it. It is free and it is local. Practical for the occasional document; laborious as an answer for a folder of six hundred.

Fix 3: keep a separate index

Instead of modifying your files, an application can read each document once, keep the recognised text in its own index, and search that. Nothing is written back into the PDF, and searching becomes instant because the reading already happened.

This is the approach document managers like DEVONthink take, and it is the approach I took in Tidy. The difference between them is usually where the documents have to live: some tools require you to import everything into their own library, and some read your files where they already are.

That distinction matters more than it sounds. If the tool holds your documents, leaving it is a migration. If it only reads them, leaving it is dragging the app to the Trash and your folders are exactly as they were.

What I would do

If your problem is everything from here on, turn on OCR in whatever scans your documents. That is the cleanest fix and it makes the files better forever, independently of any app.

If your problem is the pile you already have, an index is faster, because it does not ask you to reprocess and re-save thousands of files. And whatever you choose, check first whether your scans have a text layer, because if they do, none of this is your problem and something else is wrong.

The app I build is Tidy. It reads what is inside your images and scanned PDFs with on-device text recognition, names each file from its contents, and lets you search inside them from anywhere with a keystroke — including the scans Spotlight cannot see. Your files stay where they are, in their own folders. $9 once, no subscription, macOS 14 and up, nothing leaves your Mac.

text spotlight files document file read

Related Articles