Jitsumi

PDF Redaction: Why a Black Rectangle Can Leave Text Exposed

A black rectangle can conceal PDF text without removing it. Learn Acrobat redaction, hidden-data checks and a reproducible synthetic test.

Two masked reference-code examples: a black rectangle leaves text extractable, while an applied PDF redaction removes it in a synthetic local test.

A PDF with a solid black bar over a name or account number can look safely redacted. Yet someone may still be able to select, copy or extract the text underneath. Drawing a rectangle over sensitive information is not the same as removing that information from a PDF.

The safer workflow is to apply a genuine redaction, save the result as a separate file, consider hidden-information sanitisation, and review the saved copy before sending it. That means inspecting not only what the page displays but also text, comments, document properties, attachments and other material you intend to withhold.

This guide covers Adobe's desktop Acrobat redaction workflow as documented in 2026 and includes a small local experiment with a fictional PDF. The experiment was actually run with PyMuPDF 1.26.7; the Acrobat steps are based on Adobe's documentation, not on an invented hands-on test.

Why covering text and deleting text are different

A PDF page can combine text objects, image objects, vector drawings, annotations and other information. A rectangle added above a text object may hide the characters from view without removing the underlying object. The recipient can sometimes recover it by copying page text, extracting the text layer or inspecting the PDF with another application.

A real redaction has a different purpose: it identifies content to remove and then applies that removal. PyMuPDF's redaction API reference describes marking and applying redactions as separate operations. Its documentation also explains that the final save needs appropriate garbage collection for physically removed content.

To demonstrate the difference without handling anyone's private data, we generated a one-page PDF containing the fictional marker DEMO-4821-NOT-SECRET. We created two output files: one with a black drawing rectangle over the marker, and another with a redaction annotation that was applied before saving. Both looked covered, but text extraction found the marker only in the first.

A comparison of a black-rectangle overlay and an applied PDF redaction. In the synthetic test, the overlay leaves text recoverable while the applied redaction removes it.

Original schematic of the local synthetic test, not an Acrobat screenshot. Both examples look masked. The different text-extraction results are what matters.

This test establishes one narrow but useful point about a plain text PDF. It does not claim that every PDF editor, scanned document, attachment or metadata field behaves the same way.

Apply a genuine PDF redaction in Acrobat

Adobe's current redaction instructions, updated 31 August 2026, describe the desktop route through All tools → Redact a PDF. The Adobe tutorial updated in June 2026 identifies Acrobat Pro, Premium and Studio as supported editions for the redaction tools. Do not assume that a free PDF viewer's drawing or annotation feature does the same job.

Before editing, retain an original in a secure location. Use a copy for redaction and decide which names, identifiers, images and other facts the recipient must not receive. With work, health, legal or customer records, follow the appropriate access and approval requirements.

  1. Open the PDF in a supported desktop Acrobat application. Choose All tools → Redact a PDF.
  2. Select Redact text and images. Mark the words, numbers and images that must be removed. Review surrounding text; a rectangle can be too narrow or so broad that it deletes something important.
  3. If the same phrase appears repeatedly, use Find text and redact. Adobe documents how to search, mark checked results and then apply them. Inspect the proposed matches rather than assuming every occurrence is identical or machine-readable.
  4. Review the marks page by page, including repeated identifiers in headers, footers, annexes and tables.
  5. Select Apply. In the subsequent dialog, choose whether to sanitise hidden information as appropriate, then continue and save the output under a distinct filename.
  6. Reopen that output file and inspect the redacted areas, the remaining page content and the hidden information that matters to your use case.

The Apply action is decisive. A preview or mark is not a completed redaction. The output is meant to be irreversible, so retain the original separately only when authorised and necessary.

If the interface does not display these controls, check which Acrobat edition and version is installed. Do not substitute a black shape, highlight, page crop or changed font colour and describe the document as securely redacted.

Hidden data needs a separate review

Some information does not appear as ordinary visible text on the page. Document properties may identify an author or creator; a reviewer may have left comments; a file may contain an attachment or hidden layer. Redacting one visible paragraph does not tell you whether those other objects were examined.

Adobe's Sanitize PDFs guidance, updated 22 October 2026, calls out metadata, comments and hidden layers. It describes All tools → Redact a PDF → Sanitize document with Remove all and Selectively remove options. Selective removal is useful when some non-visible information legitimately needs to remain.

Action

Purpose

Important limit

Put a filled rectangle on a page

Conceal content in the viewer

The original PDF text may remain extractable

Mark and apply redactions

Remove targeted page content

Does not prove that every repeated value and other hidden field was reviewed

Sanitize hidden information

Deal with metadata, comments, hidden layers and similar material

Does not automatically identify every visible secret you intended to remove

Search the saved PDF

Check for specified machine-readable values

Cannot establish that every scanned image or non-text object is safe

These checks complement one another. A text search with no results is not a universal privacy guarantee: a scanned image can contain words as pixels, with no text layer to search. An optical character recognition (OCR) layer can also differ from the visible image. Review the actual pages, especially photographs and scans, in addition to any text-extraction results.

A reproducible local test with fictional data

You can confirm the difference between a drawn shape and an applied redaction without uploading a document to a website or using real private information. This Python example creates a completely fictional PDF, adds the same black region in two different ways, then checks whether the reference string survived in each saved file.

The underlying workflow was run locally with PyMuPDF 1.26.7. PyPI now lists PyMuPDF 2.0, released 19 October 2026. The specific test below is attributed to the version actually used, not represented as a test of the newer major version.

For an isolated reproduction, use Python 3.10 or later and install the version exercised locally:

python -m pip install "PyMuPDF==1.26.7"

The following is a demonstration, not a redaction program for real client documents:

import pymupdf as fitz

MARKER = "DEMO-4821-NOT-SECRET"

# Generate a new PDF containing only fictional information.
source = fitz.open()
page = source.new_page(width=520, height=300)
page.insert_text((54, 164), "Reference code: " + MARKER, fontsize=15)
source.save("source.pdf")
source.close()

covered = fitz.open("source.pdf")
box = covered[0].search_for(MARKER)[0]
area = fitz.Rect(box.x0 - 3, box.y0 - 1, box.x1 + 3, box.y1 + 1)
covered[0].draw_rect(area, color=None, fill=(0, 0, 0), overlay=True)
covered.save("covered-only.pdf", garbage=4, deflate=True)
covered.close()

redacted = fitz.open("source.pdf")
redacted[0].add_redact_annot(area, fill=(0, 0, 0), cross_out=False)
redacted[0].apply_redactions()
redacted.save("redacted.pdf", garbage=4, deflate=True)
redacted.close()

for path in ("covered-only.pdf", "redacted.pdf"):
    check = fitz.open(path)
    text = " ".join(page.get_text() for page in check)
    print(path, MARKER in text)
    check.close()

The first output should report True; the second should report False. In our recorded local test, the fictional marker survived the drawn rectangle but was absent from extracted text after redaction and a full save.

There are two important limitations. This example begins with selectable text that PyMuPDF itself created, so its search operation locates the exact marker. Real PDFs can contain scanned pixels, annotations, attachments, form data and multiple copies of sensitive content. Also, PyMuPDF's API documentation details separate handling for overlapping images and vector drawings; removing text alone does not certify everything else in a file.

Never substitute the script for an organisation's approved document-handling procedure. It does not discover all sensitive content and is intentionally limited to a harmless demonstration.

Verify the actual file you will share

First, inspect every visible page. Open the saved PDF in a separate reader if possible. Check the bars, any cropped areas, tables, headers, footers, page images and attachments. A recipient should not need to guess which parts are still meant to be legible. If a black bar covers only half an identifier, go back to the controlled working copy and redo it.

Second, search for values you know were removed. Try searching for an exact name, email address or document identifier that was meant to disappear. In a local viewer, try selecting or copying nearby text into a trusted editor. If a supposedly removed value appears in a search result, copied selection or text extraction, stop and correct the file. The absence of a match narrows the concern; it is not proof that the whole file has been audited.

Third, examine non-visible information. Use the document's properties, comments, form and attachment controls where available. Decide whether metadata, embedded files and annotations must be removed or retained. Adobe's sanitisation guidance addresses several of these areas, but your own review still has to determine what is confidential.

Fourth, inspect scans as images. A page that looks like one photograph may have no searchable text at all. A successful text search tells you little about writing or barcodes contained as pixels. Check magnified areas and use an authorised OCR workflow if necessary, without assuming OCR found every character.

Finally, verify the recipient and the filename. If the original and redacted copies have similar names, examine the exact one attached to your email or upload form. Confirm the recipient is authorised to receive all remaining information, not simply that a redaction tool has been used.

For sensitive or regulated releases, a second authorised reviewer and a short internal audit record are worthwhile. Avoid writing the secrets themselves into that record. Note what source was reviewed, what kinds of information were removed, and which saved output was approved.

Why common shortcuts are insufficient

Printing to PDF is not a documented redaction method. It can change a file's representation, but different applications preserve different data. Do not assume it removed every sensitive object, invisible field or copy of a value unless the resulting file has been checked.

A password or restricted permissions do not remove the data. These controls concern who may access the document or which operations a compliant reader permits. They do not make an undisclosed field absent from the document being delivered.

Flattening, screenshots or exporting an image are not automatic certification either. A fully rasterised image might eliminate the original text objects, yet sensitive information can remain in pixels, other pages, attachments or a different exported copy. The question is whether all disclosure paths in the final artifact were reviewed.

If a PDF with recoverable confidential information has already been shared, stop further distribution, notify the responsible owner or security contact and use the recipient service's supported revocation or replacement process. Deleting a message does not prove that downloaded copies no longer exist.

The release decision

A finished redaction is defined by what no longer exists in the delivered document, not by how opaque its black boxes look. Apply a supported redaction, consider hidden-information sanitisation, and check the saved output against the sensitive values and content types that matter. If you cannot establish what remains, do not send the file as though its secrecy had been verified.

Sources and further reading

Share this post