跳到正文

拼合 PDF

把表单域和注释变成页面的一部分。

在你的设备上处理

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

这款工具的作用

Flattening turns things that sit on top of a page into part of the page itself. A filled form stops being fillable and becomes a document that reads the same everywhere; a highlight stops being an annotation a reader can drag away and becomes ink. The values and marks are drawn into the page content, and the field and annotation objects are then removed.

Use it before you send a completed form back, so the recipient cannot alter what you entered and no reader can clear the fields by accident. It is also the fix for a form that looks filled on screen and prints blank, and for a marked-up draft you want to circulate with the comments visible but no longer editable.

工作原理

  1. Drop the PDF onto this page.
  2. Leave Flatten form fields on to make the filled values permanent, and Flatten annotations on to burn in highlights, notes, stamps and drawings.
  3. Turn one of them off to keep the other: flattening only the annotations leaves the form fillable, and flattening only the form leaves the comments editable.
  4. Check the advanced options if you want unfilled fields to stay visible as empty boxes, or the drawing font embedded so the result renders identically elsewhere.
  5. Press Flatten. The result reports how many fields and how many annotations were burned in.

There is one failure this tool is built around, and most flatteners fall into it. A form whose /NeedAppearances flag is set carries no drawn appearance for its fields - the reader is expected to render the contents itself from the raw values. Flatten such a file naively and every filled box comes out empty, silently, with the typed data gone. Here the appearances are generated first and then flattened, which is why your entries survive, and any field that could not be drawn is reported rather than quietly dropped.

Links are never flattened, and that is deliberate. A link annotation has no ink of its own - it is an invisible rectangle that responds to a click - so burning it into the page would destroy a working hyperlink and draw nothing in its place. Pop-up windows are skipped for the same reason, and annotations marked hidden are left alone since they were never meant to be seen.

Flattening is one-way. The values are now marks on the page and there is no field left holding them, so no reader can extract, edit or clear them again. Keep the fillable original if you might need to correct an entry, and treat the flattened file as the copy you send rather than the copy you keep.

This is not a digital signature and does not stand in for one. Flattening makes a document harder to edit casually, but the page content is still ordinary PDF an editor can change. If you need evidence that a document has not been altered, sign it; if you need to stop people extracting or editing it, Protect PDF adds the restrictions. Flattening an already-signed document invalidates the signature.

The work happens with pdf-lib in a Web Worker on your device. A completed form usually contains exactly the details you would least like to post to a stranger's server - name, address, account number - and this one never leaves your browser.

这款工具做不到的事

  • Flattening cannot be undone from the output. The fields no longer exist, so keep the fillable original if you may need to change an entry.
  • A digital signature does not survive flattening. The signed bytes change, so the signature stops validating and the file must be signed again afterwards.

常见问题

拼合 PDF 是什么意思?
它把页面上层的东西——表单里填的值、高亮、备注、图章、画的图形——直接画进页面内容本身,再删掉承载它们的对象。文档看上去一样,行为却变了:上面的任何东西,读者都不能再编辑、清空或移动。
以后能取消拼合吗?
不能。值一旦成为页面的一部分,就没有可以放回去的表单域了,所以在输出文件里这个改动是永久的。你的原件不受影响,因为这个工具是新建一个文件,而不是改动你拖进来的那个——只要还有可能需要改动某处,就把原件留着。
我留空的字段会怎样?
它们会和其余部分一起被拼合,所以有可见边框的框会保留边框、里面为空。如果你是在准备一份要打印出来手写填写的表单,请用高级设置里的「保留空字段」,让空框仍作为可书写的框显示出来。
拼合后的表单和签过名的一样吗?
不一样。拼合会去掉表单域,从而挡住随手的编辑,但页面内容仍然可以在 PDF 编辑器里改动,也无法证明文档未被更改。要做到那一点请用电子签名,并且注意:对已签名的文件拼合会让签名失效。
我填好的表单会被上传吗?
不会。填好的表单往往是任何人经手的最敏感的 PDF,而这个工具用 pdf-lib 在你的浏览器里处理它。什么都不会发送,你可以在网络面板里确认。

相关工具