跳到正文

添加附件

把其他文件带进 PDF 里。

在你的设备上处理

这款工具完全在你的浏览器中运行。文件从不上传,你可以在浏览器的网络标签中亲自验证这一点。 亲自验证:打开浏览器的网络标签观察。你会看到一个查询你是否还有剩余任务的小请求,只包含工具名称和一段哈希,绝不会包含文件。

这款工具的作用

A PDF can carry other files inside it, the way an email carries attachments. This adds them: the first PDF you drop is the carrier, and every other file you add is embedded into it. The pages are untouched - an attachment is stored beside the document's content, listed in the reader's attachments panel, and extracted with a double-click.

Reach for it when the document and its evidence should not be separated: the spreadsheet behind a report's figures, the raw measurements behind a chart, the signed original behind a scan, a set of photographs behind an inspection sheet. It is also a way to get one file past a system that accepts a PDF and nothing else.

工作原理

  1. Drop the carrier PDF onto this page first, then add the files to embed - up to 20 in one pass.
  2. Give any attachment a description if its file name does not explain it. Readers show that line next to the file.
  3. Decide whether to keep the attachments already in the document or clear them first.
  4. Press Attach.
  5. Open the result and check the attachments panel before you send it - the pane is called Attachments in Acrobat and Preview, and it is where the recipient will look.

Attached files are stored whole and compressed, so a 4 MB spreadsheet makes the PDF roughly 4 MB larger - less if it compresses well, never smaller. That is the honest trade for having one file instead of two, and it is worth checking against whatever mailbox limit the document has to pass. Compress PDF shrinks the pages; it will not shrink what you have embedded.

Each embedded file is written with its uncompressed size and modification date, so Acrobat's panel shows real numbers rather than "0 bytes, unknown date", and with both an old-style and a Unicode name so an accent or a non-Latin character in a file name survives. Each one is also registered as an associated file, which is what makes a PDF 2.0 or PDF/A-3 reader treat it as belonging to the document rather than as loose baggage.

The list of embedded files is rewritten in sorted order every time rather than appended to. The format requires that order, and readers that search the list rather than walking it return nothing at all from an unsorted one - which is how an attachment ends up in the file and invisible in the reader. A name that clashes with an existing attachment becomes "report (2).pdf" rather than replacing it silently.

This is also, plainly, how a PDF becomes a delivery mechanism for something unpleasant. The same feature is what Sanitise PDF exists to strip out, and a recipient's mail gateway may well remove an attachment or quarantine the whole document. If the attached file is essential, say so on the page as well, so the reader knows to look for it.

Every file you add is read from disk in your browser and written into the PDF locally. Nothing is uploaded - not the carrier, and not the possibly rather more sensitive spreadsheet you are attaching to it.

这款工具做不到的事

  • Reader support varies. Acrobat and Preview show attachments in a side panel, some readers hide them behind a menu, and a few browser viewers ignore them entirely - so a document whose attachment is essential should say so on the page.
  • The attached bytes are added to the PDF, so the result is about the size of the original plus the size of everything you attach. Attachments are also frequently stripped by mail gateways and document management systems.

常见问题

我能附加哪些类型的文件?
任意类型。电子表格、图像、CSV、ZIP、Word 文档、另一个 PDF——格式对嵌入文件的内容没有限制。你可以一次添加最多 20 个文件,如果某个文件大到可能给你设备的内存造成问题,工具会警告而不是拒绝。
我发给的人能看到附件吗?
在 Acrobat 和预览里能——侧边有一个附件或回形针面板。有些阅读器把它放在菜单里,少数浏览器内查看器则完全忽略嵌入文件,只显示页面。因此,如果附件重要,请在文档本身里提到它,而不要指望收件人注意到某个面板。
我的 PDF 会大多少?
大约就是你所附加内容的大小。字节在存入时会被压缩,所以以文字为主的 CSV 可能明显缩小,而 JPEG 或 ZIP 完全不会缩。页面本身没有变化,所以之后运行压缩 PDF 会减小文档,却不会减小附件。
别人发给我的文件里有附件,我怎么去掉?
净化 PDF 会把嵌入文件连同 PDF 能携带的其他非页面内容——JavaScript、启动动作、嵌入媒体——一并去掉。如果你只想把附件换成别的,就把文件放到这里,并开启替换已嵌入内容的选项。
我附加的文件会被上传吗?
不会。承载用的 PDF 和你附加的一切都在本地读取,并在你浏览器的 Web Worker 里合并。这是那类实际中最看重这一点的工具之一,因为被附加的文件往往正是这份 PDF 用来汇总的底层数据。

相关工具