一直忙来忙去的,没时间写点正经的东西。最近弄了个工具,用于比较两个PDF文件的不同,把差异点标出来。
前端用Poppler解析PDF文件,然后比较,生成三个html,可用主流浏览器(Chrome, Firefox, Edge, IE不行的啦)
打开查看不同点。这Poppler虽说免费开源,但Bug无数真心难用啊。唉,看在不花钱的份上,忍了...
源代码量3万行的样子,各种奇葩算法一大堆,不是一般的复杂,虽然距离我的意愿依旧遥远,但总算见到雏形了。
下面的截图是简单的比较了两个PDF文件的结果,鼠标点击最右栏就能标出来且能自动对齐变更点,添加或者删除的能对应原始位置。
![]()
下面是个文字变更的逻辑对齐部分截图。文字属性有变更的地方鼠标放上去能弹出不同之处,黑底绿字。
![]()
下面是单独比较光栅图片的截图,鼠标点击最右栏能自动对齐,添加或删除的则能对应到原始位置,图片变更的会标出所有变更点。
大致就如同前面三个截图的样子(目前缺矢量图的比较),应该应该能满足一般需求了。
换个稍微好点的SDK,估计比对精度能虐目前市面上最强比对工具。
If a commercial SDK was used instead of the buggy poppler, this tool could rival the most
powerful PDF comparing tool in the world, I think.
诸位过客可以下载一个简单用例到电脑上,解压后用Chrome(Firefox, Edge, 别用IE)浏览器看看效果。
在这里下载/Files/Chipset/test.zip
You can download a sample to your computer, unzip and open it to view the visual effects.
A browser like Chrome (Firefox, Edge, but NOT IE) is suggested to be used. A sample can
be downloaded here/Files/Chipset/test.zip
以上附件很小,实际上本工具可以比较的单个PDF文件可达1000页以上,经过大量测试的。
The attached sample is tiny. In the real world, the tool can compare PDF files as large as
one thousand pages each or even more. It has been tested a lot for this purpose.
个人能力有限,期待反馈。诸位过客想 批评的,建议的,有合作意向的等等都可联系微信chipset008
当然,在这里评论也行。
Contact me should you have any questions concerning this tool. You can find me via a
cellular phone application WeChat by adding chipset008![]()
前端用Poppler解析PDF文件,然后比较,生成三个html,可用主流浏览器(Chrome, Firefox, Edge, IE不行的啦)
打开查看不同点。这Poppler虽说免费开源,但Bug无数真心难用啊。唉,看在不花钱的份上,忍了...
源代码量3万行的样子,各种奇葩算法一大堆,不是一般的复杂,虽然距离我的意愿依旧遥远,但总算见到雏形了。
下面的截图是简单的比较了两个PDF文件的结果,鼠标点击最右栏就能标出来且能自动对齐变更点,添加或者删除的能对应原始位置。

下面是个文字变更的逻辑对齐部分截图。文字属性有变更的地方鼠标放上去能弹出不同之处,黑底绿字。

下面是单独比较光栅图片的截图,鼠标点击最右栏能自动对齐,添加或删除的则能对应到原始位置,图片变更的会标出所有变更点。

换个稍微好点的SDK,估计比对精度能虐目前市面上最强比对工具。
If a commercial SDK was used instead of the buggy poppler, this tool could rival the most
powerful PDF comparing tool in the world, I think.
诸位过客可以下载一个简单用例到电脑上,解压后用Chrome(Firefox, Edge, 别用IE)浏览器看看效果。
在这里下载/Files/Chipset/test.zip
You can download a sample to your computer, unzip and open it to view the visual effects.
A browser like Chrome (Firefox, Edge, but NOT IE) is suggested to be used. A sample can
be downloaded here/Files/Chipset/test.zip
以上附件很小,实际上本工具可以比较的单个PDF文件可达1000页以上,经过大量测试的。
The attached sample is tiny. In the real world, the tool can compare PDF files as large as
one thousand pages each or even more. It has been tested a lot for this purpose.
个人能力有限,期待反馈。诸位过客想 批评的,建议的,有合作意向的等等都可联系微信chipset008
当然,在这里评论也行。
Contact me should you have any questions concerning this tool. You can find me via a
cellular phone application WeChat by adding chipset008