File formats

What a PDF Keeps After You Edit or Redact It

A black rectangle over text is a reasonable idea of what redaction means, and the format quietly does something else.

6 min read

What a PDF keeps after an edit is usually everything that was there before. Editing a PDF does not usually change it. It adds to it. Old versions stay in PDF files marked as superseded, which is why they grow every time you save and why a document can still contain the paragraph somebody deleted three years ago.

That one behaviour explains PDF file size, failed redactions and the documents that have embarrassed organisations after publication.

Why Saving a PDF Appends Rather Than Replaces

The design is sensible and its consequence is not obvious.

Rewriting a large file for every small change would be slow, so the format allows an incremental save. The change is written at the end and a new index points at it. The old objects are still there and simply no longer referenced.

original document
  ...
edit 1  appended, previous version now unreferenced
  ...
edit 2  appended, edit 1 now unreferenced
  ...
index  points only at the current version

file size  grows every time
content    all three versions present

This is the same shape as two things the site has already covered. A personal store marks space reusable rather than removing messages. Deleting mail does the same. In all three cases the visible list is current and PDF files hold more than that list admits.

Why a Black Box in a PDF Hides Nothing

The commonest mistake in this area follows directly. It has produced real disclosures.

Drawing a filled rectangle over text adds a shape on top. It is painted after the characters, so it covers them on screen. The characters themselves are untouched, still positioned exactly where they were, still readable by anything that looks at bytes rather than the picture.

What was done

A shape added
draw text
  "the figure was
   4.2 million"

draw rectangle
  filled black
  over that area

The page looks redacted. Two drawing instructions, both still stored.

What anybody gets

By selecting the area
select the page
copy
paste

"the figure was
 4.2 million"

No tools, no skill, no intent required. Somebody can find this by accident.

This is not an exotic attack. It is what happens when a reader selects text on a page that looks blacked out, which people do without meaning anything by it.

Proper redaction is two operations and both are needed. Remove the underlying content, then rewrite the file. Doing the first without the second leaves the original in the append history. That has been the failure in several published cases.

Read next A PDF Does Not Contain Text And That Explains Everything Why the characters under a black box are still characters.

The Other Things a PDF Carries With It

Removed text is the famous one. It is not the only thing in a PDF that never appears on the page.

What is in thereWhat it can reveal
Earlier saved versionsText that was deleted, plus roughly when
Document metadataAuthor name, software, creation and edit times
The whole of a cropped imageEverything outside the crop, at full size
Hidden or invisible layersContent switched off rather than removed
Form fields with old valuesWhat somebody typed before changing it
Embedded fontsRarely sensitive, often most of the size

The cropped image row catches people who are being careful. Cropping usually sets a visible region and keeps the whole picture. A screenshot cropped down to one paragraph still carries the rest of the screen, including whatever else was open. It travels wherever the PDF goes.

Read next Three Things Called a Signature And Only One Proves Anything Why a signed document can still gain pages after it was signed.

Where a PDF File's Size Actually Goes

Since the question of what is in a PDF and the question of why it is large have the same answer, it is worth separating the causes.

  1. Images Usually most of itA page of scanned paper is a photograph. Ten such pages are ten photographs. No amount of compressing text will touch them
  2. Fonts Larger than people expectAn embedded font travels with the PDF so it renders anywhere. Subsetting keeps only the characters used. Not every producer does it
  3. Save history The invisible oneEvery incremental save is still in there. A document edited fifty times carries fifty versions. Nothing on screen suggests it
The third is the one that responds to a rewrite. Compressing a file often produces a dramatic reduction. What happened was that the history got dropped rather than anything being squeezed.
Read next What an Image File Remembers About Its Own History The same thing in an image. Damage that accumulates and metadata that travels.

Checking a PDF Before It Leaves

  1. Select everything on the page and paste it into a text editor. Whatever turns up that you cannot see never left. Ten seconds. The black box mistake cannot survive it.
  2. Open the document properties. Author, software, dates, title. All of it travels and none of it shows.
  3. Extract the images if there are any. A cropped picture comes out whole. That is the check for the one nobody thinks about.
  4. Compare file size against what is on the pages. Twelve megabytes for four pages of text means something is in there that is not text.
  5. Finish with a full rewrite. Save under a new name. Failing that, use a function that says it removes hidden information. This is the step that makes the removals real.

The order matters more than the tools. Rewriting first and removing afterwards leaves the removal in a fresh append. Remove, then rewrite, then check the result rather than the original.

Why This Keeps Happening

Redaction failures are reported regularly, usually in documents produced by organisations with lawyers, budgets and careful people.

That is worth sitting with, because it says the problem is not carelessness. The page looked right. A black rectangle over text is a completely reasonable idea of what redaction means. The format quietly does something else. Nothing warns anybody. The document displays as intended. The failure exists only in a layer nobody was looking at.

Check the output rather than the intention. A document that looks correct on screen has told you nothing about what it contains, which is the whole lesson of the format. The ten second paste test settles more than any amount of care taken while editing.

Structural behaviour checked against the published PDF specification and the referenced articles in August 2026. Nothing here is advice about handling a particular document.

Questions People Ask

7 questions, answered in full below.

Why does a PDF get bigger every time I save it?

Because the usual save appends the change and marks the previous version obsolete rather than removing it. Old content stays put. Saving under a new name rebuilds it from what is current, which is why that produces a smaller file.

Does a black box over text hide it?

It hides it from your eyes and from nothing else. Drawing a rectangle adds a shape above the characters. They are still there, still selectable by anything that reads the file structure. Copying the area often pastes them straight out.

What does proper redaction do differently?

It removes the underlying content and then rewrites the file. Both halves matter. Removing without a full rewrite can leave the earlier version in the append history, which is a well documented way that published documents have leaked.

Is a cropped image really cropped?

Usually not. Cropping commonly marks a visible region and leaves the whole image in place, so the part outside the crop travels too. Anybody extracting the images gets the original rather than the cropped view.

What metadata does a PDF carry?

Typically the author name. The software that made it. Creation and modification times. Sometimes a title carried over from whatever it was converted from. None of it appears on the page and all of it travels with the file.

How do I check what is actually in one?

Select the whole page and paste it somewhere plain. Anything appearing that you cannot see on the page is still in the file. Then read the document properties for the metadata, which takes about a minute for both.

Does compressing a PDF remove the extra?

Usually yes, because compressing rebuilds the file. That is a side effect rather than the purpose, so it is a poor thing to rely on. Where content genuinely has to be gone, reach for a sanitise or remove hidden information option instead.

Sources

Where the figures and behaviour described above were checked.

  1. PDF Wikipedia
  2. Sanitization of classified information Wikipedia
  3. Data remanence Wikipedia