Live data from Hacker News

Diff-pdf: tool to visually compare two PDFs

github.com

31–40 of 85 posts

Re: Diff-pdf: tool to visually compare two PDFs

#32
I wrote a pixel-based visual diffing algorithm long ago that was intended for a CI tool that finds all of the UI changes in a PR. I broke the layout of a page I didn’t even know existed as an intern at Inkling and have had this idea in my head ever since.

https://github.com/deckar01/narcis

Re: Diff-pdf: tool to visually compare two PDFs

#36
post #26

Earlier quoted context omitted.

Here is one: https://vslavik.github.io/diff-pdf/

Can anyone explain how to interpret that screenshot? It just looks like a very blurry text to me.

If it was sharp, they would be identical. The “blurriness” is doubling, where the lines are not quite aligned. Red text there show you content that is in one and not the other.

Re: Diff-pdf: tool to visually compare two PDFs

#37

You can do this with Beyond Compare (it's not free, but not very expensive either) https://www.scootersoftware.com/

Beyond Compare is one of those priceless tools I pay for myself instead of waiting for my employer to pay for it. Price/functionality wise it's worth its weight in gold, it's cross platform, and its licensing is very liberal. There's just no FOSS compare tools out there that can match BC.

Re: Diff-pdf: tool to visually compare two PDFs

#38
In a previous job, I had to validate the output of an unreliable production publishing system, so I tested dozens of PDF comparison tools available at the time. The best I found was called Delta Walker. It was proprietary commercial Mac-only software, but reasonably inexpensive, accurate, and could handle long PDFs with lots of graphics well.

I remember evaluating this diff-pdf tool and finding that it fell short in some way, although it's been so long that I don't recall the specifics. Most of them failed to identify changes or reported false positives. I also remember being disappointed since this one was open source and could easily be scripted.

Re: Diff-pdf: tool to visually compare two PDFs

#40

I have been using this in a CI pipeline to maintain a business-critical PDF generation (healthcare) app (started circa 2010 I think), here is the RSpec helpers I'm using: https://gist.github.com/thbar/d1ce2afef68bf6089aeae8d9ddc05d... The code contains git-stored reference PDFs, and the test suite re-generate them and assert that nothing has changed. Helped a lot to audit visual changes, or PDF library upgrades!

Are you using singed digests in the PDFs?
Post reply on HN