Docuboxer
By Sergio Alonzo Piña··6 min read

Hidden Data in PDFs and How to Remove It

Go through your contract, résumé or invoice layer by layer and clean the real file in your browser before you attach it to an email.

A PDF can carry far more than the pages you see: the name of whoever made it, scripts that run when it opens, embedded attachments, form fields anyone can rewrite, and the full-resolution originals of every image. Before you send it, you can sanitize the PDF and strip its active content using your own file. It runs in your browser with no upload, no cost and no signup, and it shows a before-and-after report of exactly what it removed.

This guide walks through each layer, the tool that handles it and where that tool stops, so cleaning a file doesn't give you a false sense of security.

What can a PDF carry that you can't see?

Hidden PDF data falls into four groups: metadata, active content, editable elements and original images. Almost none of it is malicious. It's leftover from how the file was made, and it deserves the same scrutiny as the visible text.

Metadata: author, software and dates

Every PDF stores a metadata block with a title, author, subject, keywords, the application that created it, the one that exported it, and creation and modification dates. Many programs fill the author field with the computer's user name, and the title sometimes keeps the working filename, "draft_v7" and all. A copy can also live in XMP, an XML block that repeats those fields and adds more.

The PDF metadata viewer and editor shows each field so you can change or delete it. For a field-by-field explanation, read what PDF metadata reveals about you.

Active content: JavaScript, actions and attachments

The PDF format supports JavaScript, actions that fire when the document opens, actions that launch other programs, file attachments, 3D content with its own scripts, and external links. An ordinary document rarely needs any of them, yet old templates and forms carry them along, and a forgotten attachment (say, a spreadsheet tucked inside the PDF) is more common than you'd expect.

Sanitize PDF removes JavaScript, auto-open and launch actions, attachments and metadata, and can also drop external links if you switch that option on. When it finishes, it shows a before-and-after report from the same engine as the PDF scanner, so you can see exactly what disappeared.

Here's the honest limit: sanitizing removes active content but doesn't rewrite fonts or images, so it doesn't guarantee protection against an exploit hidden in a font or a malformed image. If someone sent you the PDF, the scanner lists the markers it contains without running anything; it isn't an antivirus either. More background in whether a PDF can contain a virus.

Editable fields, comments and higher-resolution images

Two more leaks aren't about security but about control: what the recipient can change, and what they can recover from your images. Both are easy to fix before sending.

Form fields and comments someone can change

If your PDF has filled-in fields or comments, whoever receives it can edit them. Flatten PDF turns them into a fixed part of the page, in two modes. In "Forms" mode, each field's value is drawn onto the page and the field is removed; the text stays vector, selectable and sharp. That mode only handles form fields, not comments or highlights. In "All" mode, every page is rasterized with forms and annotations included: nothing remains editable, but the text is no longer selectable.

Embedded images that hold more than they show

A photo shrunk on the page may be stored in the PDF at its original resolution, sometimes with more detail than you meant to share. Extract images from a PDF works as an audit: you download everything in a ZIP, JPEGs come out byte-identical to what's inside the PDF, and the rest are converted to PNG. If something shouldn't go out, rebuild the document without that image before you send it.

Do black boxes really remove the text underneath?

No: a black rectangle drawn on top only covers the text, which stays in the file where it can be selected, copied or searched. The mistake has tripped up high-profile court filings, such as a 2019 filing in the Manafort case whose blacked-out passages could be copied and pasted. A real redaction deletes the content underneath.

None of the tools in this guide performs a true redaction. Docuboxer is building one, with no date yet. Until then, search with Ctrl+F or Cmd+F for anything you thought you covered: if search finds it, it is still there.

What if the PDF is corrupted?

If a PDF won't open or looks incomplete, try Repair PDF before recreating it: it rebuilds the file's internal structure and tells you which method worked, how many pages it recovered out of how many there were, and what was lost. As a last resort it redraws pages as images, and those pages lose selectable text. It recovers what can be recovered; it can't perform miracles on a truncated file. If you need both, repair first and sanitize afterwards.

A quick checklist before you send a PDF

  1. Open the PDF and search with Ctrl+F or Cmd+F for anything you thought was covered.
  2. If it has forms or comments, flatten it: "Forms" or "All", depending on what you need.
  3. Run it through the sanitizer and compare the before-and-after report.
  4. If it contains photos, extract the images and check what they hold.
  5. Check the metadata last, after any other change, because some tools update dates or software when they save a PDF.
  6. If the file came from someone else, scan it before opening it.

All of this runs in your browser, with no upload, no cost and no signup, which is the point of cleaning a contract or résumé on your own machine instead of on someone else's server.

Frequently asked questions

Can a PDF contain information I can't see on screen?

Yes. Beyond the pages themselves, a PDF stores metadata (author, software, dates), may include attachments and scripts, can keep form fields and comments editable, and often holds the original images at a higher resolution than the page displays. None of it shows up when you read the document, but all of it travels with the file when you send it.

What's the difference between the metadata tool and the sanitizer?

The metadata tool lets you read each field (title, author, software, dates) and choose what to change or delete. The sanitizer works on active content: it strips JavaScript, auto-open and launch actions, attachments and metadata in one pass, then shows a before-and-after report. Use the first to inspect one field, the second for a full clean.

Does sanitizing a PDF guarantee it's safe to open?

No. Sanitizing removes the format features that run or launch things, but it doesn't rewrite fonts or images, so it can't protect you from an exploit hidden in a font file or a malformed image. Keep your PDF reader updated and scan files you didn't create. The scanner reports what a file contains, but it isn't an antivirus.

Should I flatten in Forms mode or All mode?

Forms mode keeps the text as vector text (still selectable and searchable) but only locks form fields, not comments or highlights. All mode rasterizes every page, so no field or annotation stays editable, but the text is no longer selectable. Pick Forms if you just need filled-in values fixed in place, and All if nothing should be changeable.

Is drawing a black box over text enough to hide it?

No. The box is just a shape on top: the text is still in the file and can be selected, copied or searched. A true redaction deletes the content underneath. Docuboxer is working on a dedicated redaction tool, with no date yet. Until then, press Ctrl+F or Cmd+F to confirm that what you covered doesn't show up in search.

Is it safe to clean a private PDF with these tools?

Processing happens in your browser and the file isn't uploaded to any server. You can confirm it by opening the Network tab in your browser's developer tools while you use a tool. They're free and don't require an account.

Sanitize your PDF before you send it

Remove JavaScript, attachments and metadata, then compare before and after. 100% local, free, no signup.

Open Sanitize PDF →

Related tools

You might also like: what PDF metadata reveals about you and can a PDF contain a virus?