BASALT · JOURNAL
The invisible OCR layer in a PDF can leak redacted text
A searchable scan usually contains two page representations: the visible image and an invisible text layer positioned over or behind it. That improves search and accessibility, but it creates a specific redaction hazard.
Two ways to fail
If a tool paints over the image but leaves OCR text, the page looks safe while search, copy-and-paste, and automated extraction return the secret. If a tool removes OCR text but merely covers the image, extracting the original image reveals the secret pixels.
Both layers must change in one operation: destroy the pixels within the mark and remove the corresponding OCR glyphs.
OCR is a finding aid, not authority
OCR can miss faint type, handwriting, skewed lines, unusual fonts, and characters inside complex backgrounds. It can also misrecognize values: 0 becomes O, or a digit disappears. Search known identifiers in several forms and visually review every page.
After redaction, do not rerun OCR blindly over the original-looking page. OCR the sanitized pixels and confirm that no characters are generated inside redacted regions.
How to verify both layers
Extract all text from the final file with an independent parser and search the target list. Extract page images or render without annotations and inspect the marked region at high zoom. Check that the file does not contain the source scan as an attachment, thumbnail, hidden layer, or earlier revision.
For a complete scanned-document procedure, see how to redact a scanned PDF.
Frequently asked questions
Why is blacked-out text still searchable?
The black region changed the visible image or added an overlay, while the invisible OCR text remained unchanged.
Can I just delete the OCR layer?
That protects against text extraction but does not remove the sensitive pixels from the scan. Edit both.
Should OCR be run before or after redaction?
OCR before review helps find candidates. After destructive image redaction, any rebuilt OCR layer must be generated from the sanitized page and verified.
Doing it in Basalt
Basalt treats an image mark and its OCR glyphs as one redaction, edits the pixels, removes intersecting invisible text, and verifies both in the written file. OCR runs locally through macOS Vision. Get Basalt.
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.