BASALT · JOURNAL
Searching a large PDF, and why it is usually fast
Searching a long document sounds expensive and generally is not. The work is reading each page's text and scanning it for a string, and both halves are cheap compared with rendering.
Measured: searching a 2,000 page text document took 0.24 seconds, including extracting the text from every page. The string matching itself is noise beside the extraction.
Why it is cheap
Text in a PDF is stored as instructions, not as pixels. Extracting it means walking the content stream and reading the strings, which is a linear pass over a small amount of data. There is no decoding, no rasterising, and no need to lay out the page visually.
This is also why search does not need the document to be open in a viewer. The text is available from the file structure directly.
Why your scanned document finds nothing
A scanned page has no text at all. It has a picture of text, and a search will correctly report no matches on a document full of the word you are looking for.
This surprises people regularly, and it matters in document review, because a search that returns nothing looks identical whether the term is absent or the text layer is. The distinction is worth checking explicitly: if a document returns zero matches for common words like "the", it has no text layer.
OCR adds the layer
Optical character recognition reads the image and adds an invisible text layer positioned over the picture. The page looks unchanged and becomes searchable.
Two consequences that matter for redaction work. First, OCR is imperfect, so a search over an OCRed document can miss terms the recognition got wrong, and a review that relies on search alone will miss those pages. Second, the OCR layer is real text in the file, which means a redaction that destroys the pixels but leaves the text layer intact has removed the picture of the word and kept the word. That is a documented failure mode, and it is why the text layer has to be handled as carefully as the image.
Search across a set
Searching a hundred documents is a hundred times the work of searching one, which at these speeds is still fast. The practical limit is usually not the searching but the reading of results, which is why marking every hit automatically is dangerous: a search that matches a common surname will match it in contexts that should not be redacted.
Frequently asked questions
How fast is searching a large PDF?
Fast, because text is stored as instructions rather than pixels and extracting it is a linear pass over a small amount of data. A measured search across a 2,000 page text document, including extraction from every page, took 0.24 seconds.
Why does searching my scanned PDF find nothing?
Because a scanned page contains a picture of text rather than text. Searching finds no matches even for words plainly visible on the page. If a document returns zero matches for a common word such as 'the', it has no text layer and needs OCR.
Does OCR make a scanned PDF searchable?
Yes. OCR reads the page image and adds an invisible text layer aligned with the picture, so the page looks the same and becomes searchable. Recognition is imperfect, so some terms will be missed, which matters when search is being used to find material to redact.
Can redaction miss the OCR text layer?
Yes, and it is a known failure. If a redaction destroys the pixels of a scanned word but leaves the invisible OCR text underneath, the visible picture is gone while the machine readable word remains and can be extracted. Both layers have to be handled.
Doing it in Basalt
Basalt is a native macOS PDF toolkit with eighteen tools in one window. It opens large documents without loading them into memory, renders pages on demand, and copies files into its engine in fixed-size chunks, so peak memory follows the chunk size rather than the file size. Redaction destroys content rather than covering it, and an independent verifier re-opens every written file to prove the material is gone before the file is saved. A one time $29 licence covers up to three Macs, it is free for the first 24 hours, and the engine holds no network entitlement at all, which macOS enforces at the code-signature level. Download it 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.