跳到正文

编辑 PDF

在页面上添加文本、图像和形状,并遮盖不该显示的内容。

在你的设备上处理

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

这款工具的作用

This adds new content to a page: a text box, an image, a rectangle, an ellipse, a line or a white patch, placed where you put it. What it cannot do is re-type the words already there. A PDF stores glyphs at coordinates in a font usually subset to the characters it already uses, so turning March into April may need a letter A that is not in the file at all. Anything you add is written into the page's content stream.

Reach for it to date and initial a printed form, to drop a logo onto a cover page, to write a correction beside a wrong figure, or to cover a phone number before a document goes further round the office.

工作原理

  1. Drop the PDF onto this page. It is rendered for you and you work on the page you can see.
  2. Choose what to place - text, image, rectangle, ellipse, line or whiteout - and drag out the area it should occupy.
  3. Set what that item needs: size, colour, opacity and rotation for a shape; family, weight and alignment for text.
  4. Carry on across as many pages as you need. One pass takes up to 2,000 items.
  5. Press Apply edits and the download starts on its own.

Every tool that appears to edit existing PDF text does one of two things: it rebuilds the page from a guess at its structure, which moves the layout, or it covers the old text and draws new text over it. This tool does the second, openly. For genuine paragraph editing, convert with PDF to Word, edit there and convert back - a route that re-flows the document rather than reproducing its pagination.

A whiteout patch covers text. It does not delete it. The words underneath stay in the content stream and can still be selected, copied and searched, so a covered bank detail is a bank detail you have published with a rectangle over it. Redact PDF rebuilds the page from pixels, which is the only version of this that removes anything.

Embed the font decides which faces your text is drawn in. On, it uses Noto Sans and Noto Sans Mono - about 2 MB, served from this site's own origin and cached after first use - which covers accented Latin, Greek and Cyrillic. Off, it uses the standard faces every reader already has, which adds no bytes but can only encode WinAnsi. Neither set covers CJK, Arabic or Indic, and characters outside the set are folded to the nearest the face can draw rather than aborting the job.

Images are placed at the size of the box you draw, so a 2,000-pixel logo does not arrive 2,000 points wide. PNG and JPEG are accepted and nothing else, and transparency is kept, which is what makes a PNG signature sit on the page rather than in a white square. The image is read from your disk locally and embedded in the browser; it is not posted anywhere first.

这款工具做不到的事

  • Text that is already in the document cannot be re-typed here. You can cover it and draw new text over the top, or convert to Word, edit, and convert back.
  • A whiteout patch hides text rather than removing it; the words remain in the file and can still be copied or searched. Use Redact PDF when the content must be gone.
  • New text is drawn in Noto Sans, Noto Sans Mono or a standard face, not in the document's own font, which is normally subset and cannot accept new characters. CJK, Arabic and Indic scripts are not covered by either set.

常见问题

我能改动 PDF 里已有的文本吗?
不能直接改。文件保存的是逐个定位的字形,字体子集化到它已包含的字符,所以你想要的字母可能根本不存在。有两条路可走:用白色遮盖块盖住旧文本并在上面输入新文本,这样页面的其余部分丝毫不变;或者转换为 Word,在那里编辑再转回来,这能给你真正的段落,但会重排版面。
白色遮盖块和涂黑一样吗?
不一样。白色遮盖只是画在页面上的一个白色矩形;下面的文本丝毫未动,仍可被选中、复制或搜索到。涂黑 PDF 会把该区域栅格化,因此下面什么都不剩。如果你要隐藏的是姓名、地址或账号,请使用涂黑。
我能在页面上放置哪些图像格式?
PNG 和 JPEG。PNG 会保留其透明度,这正是签名或无背景徽标所需要的。其他任何格式都会被拒绝,而不是悄悄弄坏,所以请先转换它。
为什么我的文字看起来和文档其余部分不同?
因为它是用我们能嵌入的字体绘制的,而不是文档自己的字体,后者通常子集化到已用字符,无法拼写任何新内容。挑选最接近的字族,按点数匹配大小,对于简短的更正,差异通常不易察觉。
我该改用转换为 Word 再转回来吗?
如果你需要重写段落,是的。如果你只需要加一行、一个日期、一张签名图片或一块遮盖,则不必——来回转换会重排文档,因此换行、分页和间距都可能移动。就地编辑只改变你放置的内容。
我编辑文档时它会被上传吗?
不会。页面由 PDF.js 渲染、由 pdf-lib 重写,二者都在你设备上的 Web Worker 中运行,你添加的任何图像也都是在本地从磁盘读取的。打开网络标签并编辑一个文件:什么都不会发出去。

相关工具