对比 PDF
查看两个版本之间的改动,既看文字也看像素。
这款工具完全在你的浏览器中运行。文件从不上传,你可以在浏览器的网络标签中亲自验证这一点。 亲自验证:打开浏览器的网络标签观察。你会看到一个查询你是否还有剩余任务的小请求,只包含工具名称和一段哈希,绝不会包含文件。
这款工具的作用
This compares two PDFs twice and reports the results separately: a word-level diff of what the documents say, and a page-by-page pixel comparison of what they look like. What you get is an HTML report naming the changes, not a blended similarity score. If the two files turn out to be identical, the report says so in its title rather than leaving you to interpret an empty list.
When a document has come back and you need to know what moved: a contract returned by the other side, a specification revised by a supplier, a design proof against the version you approved, or two copies of a report you are no longer certain are the same file.
工作原理
- Drop both PDFs onto this page. The first is treated as the original and the second as the revision, which is what the labels in the report mean.
- Choose text, appearance or both. Both is the default and costs one render of each document.
- For the appearance pass, set the resolution and the sensitivity - sensitivity is how large a pixel difference has to be before it counts as a change rather than as rendering noise.
- Leave ignore whitespace on so that a reflowed paragraph does not report as a change on every line.
- Press Compare and open the report. It lists the added and removed passages and the percentage of pixels that differ on each page.
A lawyer wants the words and a designer wants the pixels, and one blended percentage would answer neither. The text pass diffs the documents word by word, so a changed sentence reports the words that changed instead of a scatter of letters. The appearance pass renders both documents and compares page one with page one, counting the pixels that differ beyond the tolerance you set.
The text comparison treats each document as a single stream of words, so it tells you what changed rather than which page it changed on. That is deliberate - a paragraph inserted on page two would otherwise make every later page report as different - but it means the appearance pass is where you look when you need location.
The appearance pass compares by page number, which is right for a revision and misleading for an insertion: add a page at the front and everything after it differs from its counterpart. Pages present in only one document are flagged as such, and two documents on different paper sizes are compared over the region they share, with the rest counted as different.
Two renders of genuinely identical pages are not bit-identical, because anti-aliasing is not deterministic to the last channel value, so a comparison with no tolerance reports that noise as change. The default sensitivity of 20 per cent ignores small differences. The report also lists at most 200 individual changes and then says how many it has not listed, rather than truncating quietly.
这款工具做不到的事
- The report lists at most 200 individual text changes, and says how many more there were. Wholesale rewrites are better compared by exporting the text and diffing it elsewhere.
- Scanned documents have no text layer, so the text pass finds nothing to compare. Run OCR PDF on both first, or compare by appearance only.
- The appearance pass compares page 1 with page 1 and so on, so an inserted or deleted page makes everything after it report as different.
- The report gives counts and percentages for each page, not a marked-up image showing where on the page the difference falls.
常见问题
- 「文字」和「外观」有什么区别?
- 文字会从两个文档里取出词语并做差异比较,无论一个改动的数字或删掉的条款移到了哪里,都能找到。外观会把两者都渲染出来比较像素,能抓到偏移的页边、换掉的徽标或字体替换——这些光看词语永远看不出来。
- 灵敏度滑块是做什么的?
- 它设定两个像素要相差多少才算作变化。渲染并不会精确到最后一个通道值都一致,所以设得太低会把抗锯齿也当成变化。默认的 20% 是个合理的起点:想抓细微的偏移就调低,报告里满是毫无意义的差异时就调高。
- 我能对比两个扫描件吗?
- 按外观可以——那正是像素比较的用途,不过同一张纸扫两次会处处略有不同,需要把灵敏度调高。按文字则不行,除非扫描件经过 OCR:没有文字层,就没有可比对的对象。
- 最后我会得到什么?
- 一份可以保存、打印或转发的 HTML 报告。开头是一段摘要——是否相同、有多少处文字改动、多少页发生了变化——接着列出新增和删除的段落,最后给出每页的像素差异百分比。没有这个网站,任何人都能打开它。
- 两个文档都会被上传吗?
- 不会。两者都在你浏览器的 Web Worker 里读取、渲染和比较,这也是为什么对比一对五十页的文档不取决于你的网络。报告也是在本地生成的。