跳到正文

编辑元数据

更改 PDF 关于自身携带的标题、作者和日期。

在你的设备上处理

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

这款工具的作用

Every PDF carries a set of details about itself: a title, an author, a subject, keywords, the program that produced it and two dates. Readers show them in a properties dialog, some show the title in the window bar instead of the file name, and search tools index them. This tool reads what is in your document, lets you change any of it, and writes the result back without touching a single page.

Use it when the details are wrong or revealing: a document exported from a colleague's template that still carries their name, a report whose title is "Microsoft Word - draft3.docx", a file going outside the organisation with an internal project code in its keywords, or a scan with no details at all that you would like to be findable.

工作原理

  1. Drop the PDF onto this page. Every box is filled in with what the document currently holds.
  2. Edit the boxes you care about and leave the rest alone.
  3. Empty a text box to remove that detail from the file entirely. An empty date box leaves the date as it is.
  4. Set the dates in ISO form under advanced options if they need correcting, and clear the XMP packet there if you want only the classic details left.
  5. Press Save metadata and the download starts.

The boxes are filled from your document before you touch them, and that is the whole design. An editor that starts empty makes you retype what is already there to change one field, and silently blanks everything you did not retype. Because the boxes are pre-filled here, an empty box can safely mean "remove this" - which is the only way a form that submits every field can express the difference between clearing a value and leaving it alone.

A PDF stores its details twice: the old Info dictionary and the newer XMP packet, and every modern reader believes the packet when the two disagree. Editing only the dictionary is the classic metadata-editor bug - Acrobat keeps showing the old title and you conclude the tool is broken. So when your document already has a packet, it is rebuilt from the details you just saved. That rebuild does discard producer-specific XMP extensions written by Illustrator or InDesign, which is a real loss and a smaller one than showing you a title you had just deleted.

Dates are ISO 8601 because a PDF date is unambiguous and a localised one is not. "03/04/2026" is two different days depending on where the reader lives, and metadata is precisely where that ambiguity outlives everyone involved. Write 2026-03-04, or 2026-03-04T09:30:00Z when the time matters. An empty date box leaves the existing date alone rather than clearing it, which is the one place where the boxes here differ from each other.

The producer field is left exactly as your document had it. This tool does not stamp its own name over whatever wrote the file, because the producer is often the one honest clue about how a document was made, and quietly rewriting it would make every file that passed through here look the same.

If what you want is nothing rather than something else, Remove metadata is the tool: it deletes the objects instead of the references, since pdf-lib writes out every object in the file whether or not anything points at it, and a packet that is merely unreferenced is still there for anyone with a hex editor.

常见问题

这些信息会出现在哪里?
在阅读器的文档属性对话框里、在偏好显示 PDF 标题而非文件名的阅读器的窗口或标签标题里、在文件管理器的列里,以及在任何会读取文档内部的搜索工具的索引里。它随文件一起流转,所以你在这里设置的标题,即便收件人在磁盘上重命名了文件,也仍是他们看到的。
我要删除某个字段而不是更改它,怎么做?
清空该框再保存。因为你放入文档时每个框都已从中填好,所以空框是一条删除该条目的指令,而非失误。日期的行为不同:清空日期框会保留已有日期,所以如果你连日期也想去掉,请用删除元数据。
日期需要什么格式?
ISO 8601:日期写 2026-03-04,需要时间时写 2026-03-04T09:30:00Z。任何浏览器无法解析为日期的内容都会被报错拒绝,而不是当成乱码写入。这两个日期是创建日期和最后修改日期,阅读器会在属性对话框里显示两者。
XMP 包是什么,我该清除它吗?
它是 PDF 元数据里较新的那一半,一个阅读器比旧 Info 字典更信任的 XML 块。日常使用时别动它:它会从你的编辑重建,好让两半保持一致。只有当你想让文件里只剩经典字段,或某个来自其他程序的包携带了你不想传递的历史时,才清除它。PDF/A 文件需要它的包,所以不要在这种文件上清除。
我的文档会离开设备吗?
不会。信息在你的浏览器里从文件读取、在页面上编辑、在本地写回。既然来这里的通常原因就是有个不该留在文件里的名字或项目代号,那把文档发到服务器去除掉它,就本末倒置了。

相关工具