跳到正文

涂黑删除

把文字和图像彻底删除,而不是盖住它们。

在你的设备上处理

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

这款工具的作用

Redaction here removes the content rather than covering it. Every page carrying a redaction is rebuilt from pixels: the boxes are drawn into the page, the page is rendered at the resolution you choose, and the render becomes the new page. The original content stream is discarded rather than edited, so there is nothing underneath to select, copy or search. Pages with no redactions are copied through untouched.

Whenever a document has to go out with something taken out of it: names in a court filing, salaries in a board pack, an account number on an invoice, patient details in a medical record, an internal comment in a contract going to the other side.

工作原理

  1. Drop the PDF onto this page and draw boxes over whatever has to go. Each box is one redaction.
  2. Add a phrase under find and redact to catch every occurrence of a name or a number wherever it appears, instead of hunting page by page.
  3. Set the resolution for the rebuilt pages. 200 dpi reads well on screen and prints acceptably; 300 is better for print and produces a larger file.
  4. Leave keep the document searchable on unless you have a reason not to, and leave remove metadata on - a document's properties often hold the very name you have just taken off the page.
  5. Press Redact, then open the result and try to select the redacted text. There will be nothing there.

Drawing a black rectangle over text is not redaction, and the mistake has leaked court records, medical files and government documents repeatedly for twenty years. The rectangle is a drawing instruction added on top; the text underneath is still in the content stream, where anyone can select it, copy it or pull it out with a two-line script. The same is true of cropping.

Rebuilding from pixels is the only approach a browser can take that is genuinely safe, and it is deliberately blunt. The boxes are drawn into the document first and the page is rendered afterwards rather than the other way round, so no rounding in raster space can leave a one-pixel sliver of the original visible along an edge. There is no underneath, because the underneath was thrown away.

Losing search would be a real cost, so the surviving text is put back. The text layer is extracted before anything is drawn, every run falling inside a redaction box is dropped, and the rest is drawn back invisibly over the image. The document stays searchable and the redacted words are genuinely absent - the combination people assume a black box gives them and it almost never does.

The trade-off is size and fidelity on the pages you touched. A vector page that becomes a 200 dpi JPEG is usually several times larger, and links, form fields and annotations on that page do not survive the rebuild - which is why only affected pages are rebuilt. Check the result rather than trusting it: search for the word you removed, then select across the box and paste.

这款工具做不到的事

  • Pages containing redactions are replaced by images at the resolution you choose, so they grow, stop scaling cleanly, and lose any links, form fields or annotations they carried.
  • Find and redact matches text within a single run, so a phrase broken across a line or a change of font can be missed. Read the result before sending it.
  • A scanned document has no text layer, so find and redact has nothing to search. Draw the boxes by hand, or run OCR PDF first.
  • Redaction removes what is on the page. Content elsewhere in the file - attachments, bookmark titles, an embedded XMP record - is a separate matter; metadata removal is offered here and Sanitise PDF goes further.

常见问题

这是真正的涂黑,还是只放个黑框?
真正的涂黑。你涂黑的页面会连同画上的黑框一起渲染成图像,再用这些图像替换原来的页面,所以原始的文字对象根本不在输出文件里。只在文字上画个黑矩形,文字仍旧留在它下面,涂黑失败上新闻正是这么来的。
我怎么确定文字真的没了?
用两种几秒钟的办法检查。打开输出,搜索一个被涂黑的词:应该一个都搜不到。再跨过涂黑区域选中、复制,粘贴到文本编辑器里:应该什么都粘不出来。
它能把某个名字出现的每一处都涂黑吗?
可以。把词句输入「查找并涂黑」,每一处匹配的文字都会被框住,可以在整份文档里,也可以在你设定的页面范围内。匹配不区分大小写,账号之类的模式还能用正则表达式。因为按文字串逐个匹配,被换行分断的词句可能会漏掉。
我的文件为什么变大了?
因为被涂黑的页面现在是图像了。一页矢量文字很小,同一页做成 200 dpi 的 JPEG 通常会大好几倍。只有含涂黑的页面才会转换,所以影响与你涂黑的量成正比。降到 150 dpi 会小一些。
它也会清理文档属性吗?
会,默认如此。元数据里常存着作者的名字、原来的文件路径和生成它的软件——有时正是你刚从页面上抹掉的那个名字。需要保留属性时,可以关掉这个开关。
涂黑时文件会被上传吗?
不会,而对这个工具来说这就是全部意义。你要涂黑的文档,按定义就是里面有敏感内容的文档,为了抹掉敏感部分而把它发到服务器,是本末倒置。渲染、遮盖和重写全都在你浏览器的 Web Worker 里进行。

相关工具