How to remove hidden data from a PDF before sending it
A PDF can carry more than you see on the page: author names, attached files, scripts, comments, text under black boxes and hidden layers. This guide shows how to find each one and remove it from the copy you send.
Worked example: a deposit summary with hidden extras
In this test we built a fictional one-page tenancy deposit summary of 3,602 bytes. It had an author name and other document information, an XMP metadata block, an attached text file called call-log.txt, a script that runs when the file opens, a sticky-note comment, and an internal note hidden under a black rectangle.
Remove PDF metadata listed 8 information fields and 1 metadata reference. Embedded files found call-log.txt (73 stored bytes). Scripts and actions found 1 action hook, a JavaScript action. After removing all three and exporting, the file was 1,239 bytes and a separate PDF checker (poppler) found no metadata stream, no JavaScript and no attachments.
The comment and the covered sentence were still in that export. The Comments and annotations list showed the note with its author and date. The covered sentence could still be copied as text. Flatten PDF at 150 dpi then produced a 33,881-byte image-only copy with no text layer, no comments, no attachments and no metadata.
Where hidden data sits in a PDF
- Document information and XMP metadata: title, author, subject, keywords, the software used and dates.
- Embedded files: other documents attached inside the PDF.
- Scripts and actions: JavaScript, links and other actions that run when you open or click something.
- Comments and markup: notes, highlights and stamps, often with the reviewer's name.
- Covered or hidden text: text under a drawn box, white text, or text outside the visible page area.
- Layers: content that a PDF viewer hides by default but that is still in the file.
Remove metadata, attachments and scripts
These three settings work together and apply to the PDF you export. Your original file is not changed.
- Open Remove PDF metadata and select the PDF. The Document metadata dialog lists the fields it found.
- Set Export metadata to Remove information fields and XMP metadata, then select Apply metadata settings. Choose Replace with the fields below instead if you want to set a new title or author.
- In the editor, select Embedded files. Download any attachment you need to keep, tick Remove all embedded files from PDF exports and select Apply attachment settings.
- Select Scripts and actions, tick Remove scripts and interactive actions from PDF exports and select Apply action settings. Links, form submission and calculations stop working in the export.
- Select Export, then Download PDF.
Find comments before they travel
Open the PDF comments list to see every note, highlight and stamp in one list, with page, author and date where the PDF stores them. Download list (CSV) gives you a record to check against. In our test the CSV held one row: page 1, Note, Amelia Carter, 2026-09-12 and the comment text.
Removing metadata does not remove comments, and the reviewer's name travels with each one. If the comments should not go to the recipient, send a flattened or redacted copy, described below. Neither had comment annotations in our test. Comment icons, highlights and stamps that show on the page stay visible in the image, but the comment text and author are not kept.
Remove covered text with Flatten PDF or Redact PDF
A black box drawn over text in an ordinary editor hides it on screen, but the text is usually still in the file. The ICO warns that information can still exist underneath a black box in the original electronic file.
Flatten PDF rebuilds every page as an image at 96, 150 or 300 dpi. The copy keeps what you can see and drops what you cannot: hidden text, metadata, attachments, scripts, form fields, links and bookmarks. It also drops the text layer, so the copy cannot be searched or read aloud by a screen reader.
Flattening does not hide anything that is visible. If a name or number on the page must go, use Redact PDF: search for the text, review each match, add the regions and download the redacted PDF. Redaction exports are also rebuilt as images. In our test the sentence was already covered, so the redacted copy and the flattened copy looked the same.
Layers need an extra step
We repeated the test with a second copy that also had a layer hidden by default, holding a draft note. The editor did not show it. Flatten PDF and Redact PDF both stopped with the message that layered PDFs need a reviewed static copy before image-only export.
An ordinary export does not keep layer settings, so in our test the hidden note appeared on the exported page. That is useful: export the PDF once with Export and Download PDF, open the copy and read it, then flatten or redact that copy. We flattened it without any problem.
Check the copy you will send
Check the downloaded copy itself before it leaves you. These checks can reveal a problem, but passing them does not prove that every sensitive detail has gone. For disclosure work, see how to redact a PDF properly. All of these tools run in your browser on your device, and your files are not uploaded.
- Open the downloaded file in your usual PDF reader, not the editor preview.
- Read every page, including headers, footers and margins.
- Search for names, reference numbers and other words that should have gone. Try selecting text around any black boxes.
- Open the document properties and check the title, author and other fields.
- Look for an attachments or comments panel and check that it is empty.
- Give the file a new name so it cannot be confused with the original.
Related tools and guides
- What PDF passwords do and do not protect
- Is it safe to upload PDFs to online converters?
- Remove PDF metadata
- List and export PDF comments
- Flatten PDF
- Redact PDF
- How to redact a PDF properly
- How to make a PDF smaller for email