Why a black box over text does not redact anything
Drawing a black rectangle over a name hides it on screen, and nowhere else. The text stays in the file, one copy and paste away.
Updated
In short
A shape or a highlight drawn over text is a separate object: the text is still underneath.
Selecting, copying, searching or extracting the text recovers it in seconds.
Converting to PDF or printing to PDF keeps the text and the shape, one above the other.
Real redaction removes the text, then the metadata and hidden layers.
What actually happens
In Word, a word processor or a PDF editor, a rectangle, a black highlight or a black font colour changes how a word looks. The word itself is still in the document, with its letters and its position. A screen shows the top layer; a program reading the file reads every layer.
Exporting the document to PDF does not change that. The PDF holds the text objects and, above them, a black shape. The page looks redacted, and the text is still there.
How the text is recovered
No special skill is needed. Each of these takes a few seconds:
selecting the area and copying it into any text editor;
searching the document for a name or a number;
removing or moving the shape in a PDF editor;
extracting the text with a converter or a command-line tool;
reading the comments, the tracked changes or the document properties, which often keep the original wording;
for a black font colour or highlight, simply changing the colour back.
It happens to careful people
Court filings, official reports and company documents have been published with black boxes that readers removed with a copy and paste. The cause is rarely carelessness: the page looks right, and nothing on screen warns that the text is still there.
The other places a document keeps information
Even with the visible text removed, a document may still hold:
the revision history of an incrementally saved PDF, which can contain earlier versions of a page;
annotations and comments, form fields, bookmarks, layers and attachments;
the text layer added by OCR on a scanned page, under the image;
in Word, tracked changes and comments, even when they are hidden from view.
How to check a document you received or are about to send
Open it in a reader other than the one that produced it.
Try to select the text under each black area and paste it into a text editor.
Search the document for a value that should be masked.
Select all the text of a page, copy it, and read what comes out.
Open the document properties and look at the author, title and subject.
How to redact for real
Real redaction removes the text and everything that carries it. The method that leaves the least behind rebuilds each page as an image with the masked areas painted in, removes the metadata and hidden content, and checks the copy before it leaves.
This is what Obscelis does on export. The copy is written next to the original and reread independently: text, OCR, annotations, forms, attachments and metadata. If a masked value can still be found, the export is refused rather than published.
Does printing to PDF remove the text under a black box?
Usually not. Printing to PDF keeps the text as text and the box as a shape above it. Only a printer that rasterises the page, or a scan of a paper print, turns the page into an image, and the scan then loses quality and keeps no record of what was masked.
Is a black highlight in Word enough?
No. A highlight is a formatting of the text: removing it, or copying the text, shows the words. The same goes for a black font colour on a black background.
How can I tell whether a PDF was really redacted?
Try to select and copy the text under the black areas, search for a value that should be masked, and look at the document properties. If any of these shows the text, the document was not redacted.