Security

Why your redacted PDF still contains the text

There is a failure mode in document handling that has ended careers, and it does not announce itself. You open a PDF, drag a black box over a client name, save, and send. The page looks right. The name is gone, covered by a rectangle of solid black. Except the name is still in the file, underneath the box, selectable with a drag of the mouse and searchable with Ctrl+F.

This is not a bug in any particular program. It is what a PDF is. A page is a list of drawing instructions painted in order: first the text, then, optionally, a filled rectangle on top. Drawing a box is an addition. It removes nothing.

Why the text survives

A PDF page is a content stream — a sequence of operators. Text is drawn with something like BT /F1 11 Tf 72 640 Td (RECIPIENT ID 4471-882-9931) Tj ET. A black box drawn afterwards is a separate operator that fills a rectangle with the current colour. Every viewer paints them in the order they appear, so you see black. Every text extractor ignores the paint order and reads the text operators it finds. The two disagree, and the extractor is the one that matters when a document leaves your hands.

The same is true of the other popular methods:

  • A filled shape drawn in an editor — as above. Text intact underneath.
  • A highlight or annotation — the annotation is a separate object layered over the page. Deleting the annotation un-hides the text.
  • Exporting a page to an image and pasting it back — this one works, because there is no text layer at all any more. It also makes the page unsearchable, bloats the file and loses selectability for every other word on it.
  • Cropping the text out of the visible area — the text is off-page, not gone. Extraction still finds it.

How to test a document yourself

Do not trust the screen. Run two checks on the file you are about to send.

  1. Search it. Open the PDF in any viewer and press Ctrl+F (Cmd+F). Type the word you tried to remove. If it highlights something, the redaction failed.
  2. Copy the page. Select everything with Ctrl+A, copy, and paste into a plain text editor. Sensitive content that should be gone will appear in the paste.

Both checks take ten seconds and catch the great majority of bad redactions, because bad redactions leave the text in a readable, extractable state. A third check exists for the careful: open the file in a text editor and search for the string. Text inside uncompressed content streams is visible; compressed streams are not, which is exactly why the first two checks matter more.

What a real redaction does to the file

Removing text from a PDF means editing the page's content stream, not painting over it. There is more than one way to approach that, and the differences show up in the saved file.

Rifinit's Redact tool marks each area you draw, then applies the redaction to the page — which removes the glyphs, images and vector art underneath before painting the fill — and saves the document with the file's unused objects discarded. That last step matters: without it, a text object that is no longer referenced can still sit in the file, recoverable by anyone who knows to look.

Where redaction still cannot help

Honest limits, because a tool that oversells itself is worse than none:

  • A scan is already an image. If the page is a photo of paper, there is no text layer to remove and no text to leak through a text extractor. The black box works — but the content was never searchable in the first place, so a document you did not read carefully may contain more than you think.
  • Outlined or Type3 fonts are drawings of letter shapes, not text. Redaction cannot split them from the artwork around them.
  • Metadata and attachments are not on the page. Author, title, embedded files and comments all survive a page redaction. Check the document properties separately.
  • Redaction is not irreversible destruction elsewhere. If the file was emailed, stored in a backup, or synced to a service, the original still exists. Redaction fixes the copy in your hands.

A short checklist before you send

  1. Redact with a tool that applies the redaction, not one that draws a box.
  2. Search the saved file for the words you removed. Twice — once in a PDF viewer, once pasted into a text editor.
  3. Check document properties for author, title and company fields.
  4. Check for attachments and comments in the file.
  5. If the source was a scan, redact the image, and remember the original photo still exists somewhere.

The rule that prevents the whole class of mistake: a black box is a visual effect. Confirm the absence of the text, not the presence of the box.

From the running app

These are captures of the shipped Rifinit build, not mockups: what Redact PDF asks for and what it returns. Every workflow in this guide was checked on the same build.

Redact PDF start screen: title and description above a dashed dropzone with Choose PDF file and cloud sources
Choose the PDF to redact
Redact PDF workspace: Revenue marked by a black box, 1 mark in the panel, text search, Smart detect and auto-find chips
Mark every word that must go

Alex Roshid — Editorial lead, Rifinit. More about the author · How we write and review.

Open Redact PDF Read the full guide Browse all tools

Standards and sources: PDF parsing and writing follow the open PDF specification, documented in the Library of Congress format registry; the interface follows WCAG 2.2 (W3C). Rifinit is independent of both organisations.

By the Rifinit team. Published under the Alex Roshid byline. We build, test and document these PDF tools in-house: every guide is written by the same engineers who work on the converters, the editor and the OCR pipeline. Meet the team. Read how we write and review, our privacy policy and terms. Last reviewed .

Follow Rifinit Facebook LinkedIn Pinterest Reddit