A scanned PDF has two layers: the image you see and the invisible OCR text underneath. Redacting the visible image does not remove the OCR text, so a search for the redacted name can still find it in the hidden layer. The redaction is only complete when both layers are clean.
What you need
- Adobe Acrobat
- A scanned PDF with an OCR text layer
- The words that must be redacted, written down in advance
Step 1: Redact the visible text
Use the Redact tool to mark and apply redactions over the sensitive words on the visible pages.
Step 2: Search the text layer
Use Acrobat search, or extract the text with pdftotext, and search for each redacted word. Any hit means the hidden layer still holds it.
Step 3: Remove the hidden text
Use Sanitize or re-OCR the file with the redacted pages excluded, then search again to confirm the words are gone.
Worked example: synthetic redaction check on a scanned medical letter
The table below is a synthetic example. It shows the expected result of checking the OCR layer under a redaction; no file was redacted.
| Redacted word | Visible on page? | Found by search? |
|---|---|---|
| Patient name | No – covered | Yes – in OCR layer |
| Diagnosis | No – covered | Yes – in OCR layer |
| Hospital name | No – covered | No |
| Date of birth | No – covered | Yes – in OCR layer |
Expected result (UNTESTED). the visible redactions cover all 4 words, but 3 of them are still found by search in the hidden OCR layer. Strip the OCR layer and re-check before the file is shared. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- A text search may not find information in scanned images, so always check the hidden layer separately from the visible page.
- Re-OCRing a redacted file recreates a text layer from the redacted image, which is safe only if the visible redaction is complete.
- Check the whole document, not just the pages you redacted, because the same word may appear elsewhere.
