What are embedded files in a PDF?
A PDF can carry other files inside it. Some apps call them attachments, others embedded files or a PDF portfolio. An attachment is a complete file, such as an Excel spreadsheet, a text or CSV file, an XML invoice, an image, a ZIP archive or another PDF, stored inside the document. You usually find them in the viewer's attachments panel, and sometimes as a paperclip or pin icon on a page.
How can a PDF contain another file?
The PDF keeps a list of its embedded files, a bit like a table of contents that isn't printed. Each entry records the file's name, an optional description, its type and size, and points to the file's bytes, which are stored in the PDF alongside everything else. A page can also carry an attachment icon that points to one of those files. Because the files live in that list rather than on the pages, you can't see them just by scrolling through the document.
Are embedded files the same as page images?
No. A photo or logo you can see on a page is part of the page content, and fonts are stored separately too. Neither is an attachment, and this tool doesn't touch them. Removing an embedded file doesn't change what the pages look like.
Why remove embedded attachments before sharing?
Attachments are often added on purpose, and many are harmless. But they're easy to forget. A report exported from an office suite may carry the source spreadsheet with all its working. A contract pack may include supporting documents meant for internal review. An e-invoice may embed the full data file behind it. And a PDF that was reused as a template can keep files from an earlier version. If the recipient only needs the pages, removing what they don't need keeps the file to what you meant to send.
What the tool shows about each attachment
For every embedded file you see its name, a description if the author added one, its type (for example “Excel spreadsheet” or “PNG image”) and its size when the PDF records it. You also see where it's referenced: attached to the document as a whole, shown as an icon on a particular page, or both. The tool never guesses a size the file doesn't record. Names are shown exactly as stored, even odd ones such as paths or code, and are never used to open anything.
How to remove attachments from a PDF
- Drop the PDF onto the tool above, or choose it from your device.
- Review the list of embedded files: name, type, size and where each is referenced. All are selected; untick any you want to keep.
- Select Remove Selected Attachments. A new copy is created; your original file isn't changed.
- The copy is re-opened and checked before you download it.
Does removing attachments change the visible PDF?
It shouldn't, and the tool checks. After removal it re-opens the new copy and confirms that the selected files, and their stored contents, are gone, that the files you kept are still there, and that the page count, page content, metadata, comments, links and form fields match the original. If a removed file is shown as an attachment icon on a page, the icon is removed too, so nothing points to a missing file. If anything doesn't match, the result says “Cleaned with limitations” and lists it.
Does this remove comments or metadata?
No. To remove review comments, use Remove Comments From PDF. To remove the author, title and other document properties, use the PDF Metadata Remover.
Signed and archival PDFs
Removing attachments rebuilds the file, which invalidates any existing digital signature, so you're asked to confirm first when a signature structure is detected. Some archival PDF/A files are required to carry certain attachments, such as e-invoices. Removing them may affect conformance, so you're asked to confirm that too. PDFSanitize doesn't validate PDF/A.
Can PDFSanitize extract attachments?
Not in this tool. It's built to clean files, so it only reads each attachment's name, type and size. It never opens, extracts, previews or runs the embedded files themselves. References to files outside the PDF, which contain no embedded content, are listed and left as they are.
Should I run a privacy check afterward?
It's worth it. Run the cleaned copy through the PDF Privacy Checker to see its metadata, comments, annotations, form fields and any remaining attachments in one report. If it also reports JavaScript, Remove JavaScript From PDF can remove it.