PDF Attachments

List the files carried inside a PDF, save them out, strip the ones that should not travel, or embed new ones.

The document is unpacked, read and rewritten inside this tab. Neither the PDF nor anything embedded in it is sent anywhere, including files flagged as programs.

Built and maintained by Udit Agarwal

Check what else in the file can run

About PDF Attachments

A PDF is a container as much as a page, and most readers make very little of it. The spreadsheet behind a report, the XML of an electronic invoice, the members of a portfolio that opens as a file browser rather than a document — all of that rides inside the file, in two quite separate places: the document-level attachments panel, and paperclip annotations pinned to a particular page. Both are listed here with a name, a type, a size, a description and the dates recorded for them, and a file that appears in both shows up once with the page it is pinned to. Save one, or take the selection as a ZIP. Mark what should not travel with the document and it goes, paperclip included.

Features

  • Lists the attachments panel and paperclip annotations together, with the page each paperclip sits on
  • Type, size, description and recorded dates read straight out of the file
  • Files named like programs — .exe, .js, .bat, .ps1 and the rest — flagged in red before you open them
  • Save a single attachment, or the selection as a ZIP with safe, distinct names
  • Mark attachments for removal, and take the mark back before you save
  • Attach new files of any type, each with a description of its own
  • Removing every attachment turns a portfolio back into an ordinary PDF
  • Names containing brackets or non-Latin letters are written so readers do not choke on them

How to use the PDF Attachments

  1. Drop the PDF in and read what it is carrying
  2. Save what you want, and tick whatever should be removed
  3. Drop in any new files to embed, with a description each
  4. Save a new copy of the PDF

Example

Input

invoice-4831.pdf — an electronic invoice from a supplier

Output

1 attachment · factur-x.xml · XML · 4.2 kB · in the attachments panel

The machine-readable invoice travels inside the human-readable one.

Common errors & troubleshooting

  • My reader never showed me these files. — Most readers keep the attachments panel closed, and viewers built into browsers often have none at all. The files are in the document regardless of whether anything offered to show them.
  • The PDF opens as a list of files instead of a page. — It is a portfolio: the attachments are the point and its own pages are only a cover sheet. Remove every attachment and it becomes an ordinary document again.
  • One entry cannot be saved. — That entry is a pointer to a file on somebody else's disk rather than an embedded copy. The name was recorded in the document; the bytes were never put in it.
  • An attachment is named like a program. — Treat it as hostile unless you know exactly where the document came from. Remove it here, then run the file through PDF Sanitizer to see what else inside it can act on its own.

Frequently asked questions

Where inside a PDF are attached files actually kept?
In two places. The document-level list is what a reader's attachments panel shows, and it is the usual home. A file can also hang off a paperclip annotation on one page, which some readers only reveal when you click the paperclip. Both are listed together here.
What is a PDF portfolio, and why does mine open as a file browser?
A portfolio is a PDF whose purpose is to carry a set of files. A flag in the document tells readers to present the collection first, so its own pages act as a cover sheet. Strip the attachments and the flag goes with them.
Can any kind of file be attached to a PDF?
Yes — the format puts no restriction on it, which is exactly why an embedded file deserves suspicion. Anything can be packed in, including something executable, and the recorded type is only what the author chose to claim.
Does removing an attachment make the PDF smaller?
Usually yes, and often dramatically, because embedded files are stored whole. The document is rewritten without them and without the entries that pointed at them, so the bytes really do leave the file.
Is it safe to open a file attached to a PDF from a sender I do not know?
No safer than any other unexpected file. The PDF is merely the envelope. Anything flagged here as a program should not be opened at all, and the rest deserves the same caution you would give an email attachment.

Related tools

  • PDF Sanitizer — Remove JavaScript, auto-run actions, embedded files and other active content from a PDF.
  • PDF Inspector — See a PDF’s version, page sizes, fonts, images, forms, security and standards claims.
  • PDF Privacy Scanner — Find the metadata and personal data hiding inside a PDF.
  • PDF Metadata Editor — View, edit or strip a PDF’s title, author, subject, keywords and producer.
  • Merge PDFs — Combine multiple PDFs into one, with reordering.
  • Flatten PDF — Lock filled form fields into the page so a PDF looks the same everywhere.
  • File Hash Checksum — Compute MD5, SHA-1, SHA-256 and SHA-512 checksums of files and compare against an expected hash.

Guides

More PDF tools

  • Remove PDF Annotations — Strip comments, highlights, drawings and stamps from a PDF, keeping links if you like.
  • Remove Images from PDF — Blank out the pictures in a PDF for a lighter, text-only copy, keeping logos if you choose.
  • PDF Inspector — See a PDF’s version, page sizes, fonts, images, forms, security and standards claims.
  • PDF Font Finder — List every font a PDF uses, which pages use it and whether it is embedded.
  • Extract Links from PDF — Collect every clickable link and written URL in a PDF, with page numbers, as CSV.
  • PDF Word Counter — Count words, characters and pages in one or more PDFs, with a per-page breakdown.
  • PDF Page Counter — Count pages across many PDFs, split colour from black-and-white, and estimate print cost.
  • Make PDF Fillable — Draw text boxes, checkboxes and dropdowns onto a PDF to turn it into a fillable form.
  • Add Image to PDF — Place a logo, photo or stamp on chosen PDF pages with size, position and opacity control.
  • Overlay PDF (Letterhead) — Lay a letterhead or background PDF under or over every page of another PDF.
  • Add Margins to PDF — Add white space around PDF pages for binding, notes or bleed, per side or all round.
  • SVG to PDF — Convert SVG graphics to PDF, keeping shapes as vectors where possible.

See all PDF tools (85) · All tools