BASALT · JOURNAL
How to make a scanned PDF searchable on a Mac
A scanned PDF is a stack of photographs. Command-F finds nothing in it, copy and paste returns nothing, and no amount of zooming changes that, because there are no characters in the file, only pixels arranged to look like characters.
OCR fixes that by adding a text layer. Understanding what that layer is explains both why search starts working and why OCR is the most common cause of a failed redaction.
What a scan actually contains
Open a scanned page and you will typically find one image XObject covering the full page, usually compressed with DCTDecode for JPEG data, or CCITTFaxDecode for bilevel fax-style scans. The page content stream does almost nothing: it sets a transformation matrix to size the image to the page box and draws it.
There is no font resource, no Tj or TJ text-showing operator, and no /ToUnicode map, because there is no text to map. A text extractor walking that stream finds zero glyphs and correctly reports an empty page. The document simply never contained text.
What OCR adds, precisely
OCR does not convert the image into text and replace it. The image stays exactly where it is. OCR runs recognition over the raster, gets back recognized words with bounding boxes, and then writes a second body of page content: real text-showing operators, positioned to sit over the corresponding pixels, using text rendering mode 3.
Rendering mode 3 is the neutral mode in the PDF graphics model. Mode 0 fills glyphs, mode 1 strokes them, mode 2 fills and strokes, and mode 3 draws nothing at all. The text is placed, sized, and positioned, and then not painted.
The result is a page that renders identically to the original scan while containing a full complement of extractable characters. Command-F matches those characters and highlights the region they occupy, which lands on top of the matching pixels. The highlight appears to be finding words in the picture; it is finding words in an invisible layer standing exactly over it.
For that layer to be useful outside the viewer that made it, the fonts need a /ToUnicode map so a glyph code resolves back to a Unicode code point. Without one, copying text out can produce mojibake even though search still works.
Why the invisible layer is real text, and why that matters
The word "invisible" misleads people. The layer is invisible to the eye, not to software. Every extraction tool, every indexer, every pdftotext run, and every discovery platform reads it exactly as it reads born-digital text. Rendering mode 3 is a painting instruction, not a privacy feature.
This produces the most common redaction failure in scanned documents. Somebody OCRs a scan so it can be searched, places a black rectangle over a name, and ships the file. The rectangle is a filled path drawn after the image. The recognized name is still in the content stream, unpainted, under the box, and it comes out with a single copy and paste.
Order of operations matters. If you OCR first and redact second, the redaction must remove the recognized text as well as the pixels. If you redact the image first and OCR afterward, the recognizer never sees the removed pixels. Both work; silently doing neither is what fails. There is a full walkthrough in redacting a scanned PDF with an OCR layer, and the general principle in why a black box is not a redaction.
What OCR will and will not fix
OCR quality is bounded by the scan. Small type captured at 150 DPI, a page photographed at an angle, JPEG artifacts around thin strokes, and low contrast handwriting all reduce accuracy, and no post-processing recovers information the raster never held. If you control the scanning step, 300 DPI grayscale is a reasonable floor.
OCR does not restore document structure: you get words and positions, not headings, reading order across columns, or table cells. And it does not shrink the file.
The privacy problem with online OCR
Most OCR available in a browser works by uploading your document to a server, running recognition there, and sending a new file back. That is a transfer of the full untreated original to a third party, before any redaction, before any metadata cleanup, and usually before you have read the retention terms.
The documents people most want to make searchable are exactly the ones that should not be uploaded: medical records, client files, HR investigations, contracts under NDA. Recognition is also the moment the document is at its most complete, since nothing has been removed yet, and the exposure model is worked through in the risk in cloud PDF tools. If it happens locally and the file never opens a socket, there is no retention policy to evaluate.
Frequently asked questions
How do I make a scanned PDF searchable on a Mac?
Run OCR on it with a tool that adds an invisible text layer, then confirm search works by pressing Command-F and looking for a word you can see on the page. Preview does not perform OCR and will not add a text layer, so a scan opened there stays unsearchable no matter how you save it. Use a dedicated OCR tool, preferably one that runs locally rather than uploading the file.
Does Preview do OCR on a Mac?
No, Preview does not run OCR or add a text layer to a PDF. macOS does include text recognition through Live Text, which lets you select text out of an image on screen, but that is a viewer feature operating on rendered pixels and it writes nothing into the file. The document on disk stays a stack of images, unsearchable in every other application.
Can you tell whether a PDF has already been OCR'd?
Yes, select text on the page or press Command-F and search for a word you can plainly see. If selection produces nothing and search finds no match, there is no text layer. A more definitive check is running pdftotext on the file: output means a text layer exists, empty output means the page is image only. A partial OCR pass can cover some pages and not others.
Does OCR change how the PDF looks?
No, a correctly written OCR layer changes nothing visually, because the recognized text is drawn in rendering mode 3, which places glyphs without painting them. The original page image is untouched and still rendered exactly as before. If a tool visibly changes your page, it has rasterized or recompressed the image rather than simply adding text, which is a different operation.
Why does copying text from an OCR'd PDF give me garbage characters?
Because the embedded font in the text layer lacks a correct /ToUnicode map, so glyph codes cannot be resolved back to Unicode when copied. Search can still work inside the viewer that built the index, which is why the file feels searchable but pastes as nonsense. Re-running OCR with a tool that writes proper Unicode mappings fixes it.
Is it safe to OCR a confidential document online?
No, because online OCR uploads the complete untreated document to someone else's server. That happens before any redaction or metadata removal, so the copy you transmit is the most sensitive version of the file that exists. For anything under privilege, a protective order, HIPAA, or GDPR, run recognition locally.
Does OCR make redaction harder?
It makes redaction easier to get wrong, because after OCR the page holds both pixels and real extractable text, and a black rectangle removes neither. A redaction on an OCR'd scan has to destroy the image data in the covered region and remove the recognized text under it. Verifying the written file is the only way to know both happened.
Doing it in Basalt
Basalt's make searchable tool adds a text layer to a scan so Command-F starts finding words, and it does the recognition inside a sealed engine process that holds no network entitlement, enforced by macOS at the code-signature level. Your document is never uploaded, and there is no account and no telemetry. Every tool writes a new file, so the original scan is left exactly as it was. Redact, compress, Bates numbering, and fifteen other tools live in the same window, including a redaction verifier that re-opens the written file with an independent parser. It is $29 once for up to three Macs, free for 24 hours, at basaltformac.com.
Redaction that proves itself
Basalt destroys the content you mark, then re-opens the file it wrote and proves the content is gone before it saves anything. Your documents never leave your Mac.