How to check that redaction removed the searchable OCR text

3 November 2026

A laptop and overhead scanner beside a book on a library table.
Illustrative photograph. Cropped and resized. Photo: “Book scanning at Reşat Nuri Güntekin Children’s Library 01.jpg” — Koray / Wikimedia Commons. Original notice: Koray · CC BY-SA 4.0

A reviewer draws a black box over a name on a scanned page. The page now looks safe to send. The next check is to extract the text from the saved PDF and look for the name in the position covered by the box. In a test, use a harmless marker in place of a real name. The visible page and the searchable OCR text can give different answers.

What happened to the markers in five saved copies?

The following rows come from an actual synthetic fixture run. They record whether particular known strings appeared in the inspected locations. The decisions in the last two columns show how a reviewer could use those observations. Redaction results

Candidate File NameNative Token ExtractedOCR Token ExtractedKnown Plaintext Tokens in Decoded ObjectsFail-Closed DecisionRequired Action
synthetic-original.pdfTrueTrue3REJECTKeep the original as a positive control.
overlay-only.pdfTrueTrue3REJECTThe overlay left both known markers readable. Keep the candidate out of the release folder.
page-redacted-only.pdfFalseFalse3REJECTNeither named page-text marker was found, but three known tokens still occurred in decoded objects.
cleanup-attempt.pdfFalseFalse1REJECTOne known token remains in decoded objects.
release-cleaned.pdfFalseFalse0PASS this marker checkNone of the tested tokens was found. Continue the other required checks.

Redaction results

The third row is the most useful check on the decision rule. Both named text searches came back clear, yet three known strings still appeared in decoded objects. A reviewer who searched only the visible page or copied text into a new document would miss that discrepancy. The fourth row shows why the check needs to be repeated after each cleanup attempt. Redaction results

Run the check on the file intended for delivery

  1. Make a harmless positive control with a unique marker in the OCR layer. Extract the text before redaction to confirm that the method can find it. If the control returns no match, fix the test before interpreting a negative result on a redacted copy.
  2. Apply the redaction and save a separate candidate. Record its digest. Give that exact file to the reviewer, who opens the page, inspects the intended region and independently searches the extracted text for the marker.
  3. Examine the other locations the release policy covers. If the OCR check passes but the known marker remains elsewhere, identify which check found it and hold the candidate. If the tool cannot inspect a required location, record that limitation.
  4. After remediation, fingerprint the new candidate and rerun the control and the relevant checks. Keep the source separate from the candidate so another reviewer can reproduce the result.

A useful release record names the saved file, the method, the marker identifier, each location inspected and who owns an unresolved finding. A negative result for a known string is evidence about that test. It does not prove the document contains no other sensitive material.

Part of the How to redact a PDF properly guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).