True redaction vs the black box

A black box drawn over text in a PDF hides it on screen. The text stays in the file and comes back with copy and paste. How to check a file.

The short version

  • A black box drawn on a PDF covers text on screen only. The text under it stays in the file.
  • Copy and paste, search and screen readers still find the covered text.
  • True redaction deletes the text from the page and writes a new file without it.
  • You can check any redacted PDF in a minute with select, copy and paste.

Many PDF editors offer a black rectangle or a black highlight for hiding text. Both look like redaction. Neither one is. The rectangle is a separate object drawn on top of the page, and the words under it stay in the page's text layer exactly as they were.

That matters for accountants because the files that need redacting are the ones that carry account numbers, Social Security numbers and client names. If the box only covers the digits, anyone who receives the file can read them.

Try it

The line below is a bank statement entry with the account number blacked out three ways. Pick a method and read what copy and paste returns.

Redaction method
Checking 0000 Hidden digits: 4417 2290 6612

Copy and paste returns: Checking 0000 4417 2290 6612

Checking 0000 Hidden digits: 4417 2290 6612

Copy and paste returns: Checking 0000 4417 2290 6612

Checking 0000

Copy and paste returns: Checking 0000 (nothing, the digits are not in the file)

The first two panels show the same result for a reason. A drawn rectangle and a box comment (a Square annotation, in PDF terms) are both extra objects. The text drawing instructions for the page do not change, so any program that reads the text layer reads the digits.

What copy and paste finds

We built a one-line statement in a test, drew a black rectangle over the account number, saved the file, and read the text back with pdf.js, the PDF engine Firefox uses. The full number came back. We did the same with a black box comment and with a black highlight, and got the same result each time. These checks run on every change to this site, so this post cannot drift from what the format does.

This is not only a lab result. In January 2019, lawyers for Paul Manafort filed a court document in which blacked-out passages could be copied and pasted into another document, and reporters read them. The American Bar Association's Judges' Journal lists the case among redaction failures and describes the same copy and paste test we use below.

A black box changes what you see. It does not change what the file contains.

Which methods leak

Method Text left in the file Copy and paste finds it
Rectangle drawn over the text Yes Yes
Box comment (annotation) Yes Yes
Black highlight Yes Yes
Text removed from the page No No

A black highlight is an annotation too, so it behaves like the box comment. Changing the text colour to black on a black fill is the same trick in another form: the characters are still there.

What true redaction does

True redaction edits the page itself. It finds the text drawing instructions under the marked area, deletes them, and writes a new file. Nothing under the box is left for a reader to copy.

The redaction in the FileMorphs PDF editor works this way, inside your browser. Marked regions are removed from the file, not covered over, and every result is checked before the file is returned: the editor reads the new file back and confirms the marked text is no longer in it. The receipt shows each region with its page and character count, and is marked Verified when every region could be read back.

Three side effects are worth knowing before you apply it:

  • Text is removed one whole text run at a time. If a mark touches part of a run, the rest of that run goes too, and the editor tells you how many extra characters that is before you apply.
  • Applying redaction also removes accessibility tags, form field structure and the document metadata from the whole file, even if you mark only one page. Those structures can repeat the text you removed.
  • If text on a page cannot be removed safely, that page is turned into an image, and the editor says how many pages.

Removing the text is the first requirement, not the last. Researchers at the University of Illinois showed in 2023 that the spacing of the characters left around a redaction can hint at how wide the removed word was, and used that to guess redacted names in real documents. That is one reason the editor removes the whole text run a mark touches, which on a statement is often the whole row: a tight fit around one name is what the attack measures. For a short name in a fixed layout, consider marking the whole line or sentence.

Check a PDF yourself

  1. Open the redacted file in any viewer: Acrobat Reader, Preview or a browser.
  2. Select across the black box, from the text before it to the text after it.
  3. Paste into a plain text editor. If the hidden words appear, the file was never redacted.
  4. Search the file for a word you know was under a box. A hit means the text is still there.

If a file fails, do not send it. Redact it again from the original with a tool that removes the text, then repeat the check on the new file.

Sources