跳到正文

添加页眉页脚

在每页六个角位的任意位置放置文本。

在你的设备上处理

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

这款工具的作用

Six independent slots - left, centre and right, at the top and at the foot - because that is the arrangement printed documents actually use: a title on the left, a page number on the right, a confidentiality line centred at the bottom. Each slot takes plain text, tokens, or both, and the text is drawn into the page rather than added as a separate layer.

Use it on a document assembled from several sources that needs to read as one, on a bundle that has to carry a case name on every sheet, or on drafts that need a date so nobody argues about which version they are holding.

工作原理

  1. Drop the PDF onto this page.
  2. Type into whichever of the six slots you need. At least one must have something in it; the bottom-right slot starts with {page}.
  3. Use tokens where the text should differ per page or per document: {page}, {pages}, {date}, {filename}, {title}, {author}.
  4. Set the size, colour and margins so the text clears the document's own content.
  5. Skip the cover page or give a page range under advanced options if the opening pages should stay clean.
  6. Press Add header and footer and the download starts.

The tokens are the same ones Add page numbers uses, deliberately: someone who has learned {page} of {pages} in one tool should not have to learn a second syntax here. {filename}, {title} and {author} are read from the document itself, so a header can carry the document's own title without your typing it. Unknown tokens are printed verbatim, which makes a typo visible rather than mysterious.

Date tokens read the clock once for the whole document. A job that starts at 23:59 and finishes at 00:01 prints one date on every page rather than two, which is the kind of detail that only surfaces later, in a document nobody can now explain. {date}, {time} and {datetime} are formatted for the page's language, falling back to English formatting for a locale tag the browser does not know.

Margins are exposed rather than guessed. A document whose own text runs close to the sheet edge will collide with a header at any default inset, and the alternative - quietly scaling every page down to make room - would change every measurement in the document to fix something you can see and correct with one slider. Raise the margin or reduce the size, and check page 1 before committing.

Skip the cover page removes page 1 from the pages that get stamped; it does not change what the stamps say, so page 2 still reads 2. Use a page range instead when the front matter runs to several pages. Start counting at shifts every printed number by a fixed amount, for a document that continues another.

The font is embedded, so accented characters and Cyrillic print correctly even on readers that would otherwise substitute a face of their own. CJK, Arabic and Indic are outside what that set covers.

这款工具做不到的事

  • The text is drawn on top of the existing page and the page is never resized to make room for it. On a document whose content already runs close to the edge, a header or footer will overlap it; the fix is a larger margin or a smaller size, not a different tool.

常见问题

页眉或页脚的位置里可以输入什么?
任意文本,加上花括号中的占位符。{page} 和 {pages} 给出页码和总数,{roman} 和 {ROMAN} 给出罗马数字,{filename}、{title} 和 {author} 来自文档,{date}、{time} 和 {datetime} 来自时钟。所以 机密 - {title} - 第 {page} 页,共 {pages} 页 会原样打印出来,占位符已填入。
页脚压在了我的文字上,我该改什么?
增大底部边距、减小字号,或把那段文字移到空着的位置。页面被特意设计为绝不缩小来腾出空间,因为缩放它会移动文档中的每一处测量值。大多数文档在 24 点时留有足够空间;排版密集的文档需要更多。
怎样让封面页保持干净?
在高级选项中开启“跳过封面页”:第 1 页保持原样,其余全部盖印。如果前置内容超过一页,请改用页面范围——4- 从第四页起盖印。
页脚能显示今天的日期吗?
能。{date} 打印中等长度的日期,{time} 打印时间,{datetime} 两者都打印。时钟在任务开始时读取一次,因此每一页一致,结果会按页面所用的语言进行格式化。
文件会传到服务器吗?
不会。文档完全在你的浏览器中读取、盖印和写出,{title} 和 {author} 背后的元数据来自你面前的文件,而不是任何地方的查询。什么都不会被传输,页面加载后这款工具可离线使用。

相关工具