Show HN: PDF-Diff - Visualize any differences between two PDFs
github.com
github.com
One of my responsibilities was to get sign-off on any changes engineers made to schematics. (It was a really bad internship! I ended up automating a bunch of stuff for them because my actual job was mind-numbingly boring.)
After the first few times comparing PDFs of schematics by eye, I said screw it and wrote a tool to export to PNGs and then compare them pixel-by-pixel. It saved me a ton of time and my sanity.
It saved mine! I usually work with books and sometimes it's really difficult to tell 10 people to check every single page if something has been different to a previous pdf I sent. They will never be able to find all the differences because we're humans, not bot. We make mistakes.
Many times, you aren't really concerned with the specific differences being described natively. You just want to know if a human would perceive differences between 2 copies of the "same" form.
Funnily enough, the best performing solution for users was having the two PDFs rendered as images with a slider to "switch" between them, and relying on the human eye to spot the differences.
[1]: http://kasyan.ho.ua/indesign/all/compare_two_documents.html
Diff images, Excel documents, PDFs, whatever.
I'm also a big fan and user of Beyond Compare, but I had no idea that it can also compare those files. The above file options are also not there in the app, especially I was looking for pdf.
There is a fork here: https://gitlab.com/eang/diffpdf
Substracting PDFs with ImageMagick to test if a change in code produces the same output PDFs
Not affiliated in any way, just a happy user.
I'm playing with alpha compositing, I'm going to commit some little changes to enchant the experience a little bit.
Gotcha. I might transform this project from a command-line only to a visual tool. I could implement that, thanks for the idea. I can actually have some sections of the PDF ignored.
The pdf-diff tool simply captures a sort of "screenshot" of a PDF page and then compares it against to the page from the second PDF file you'd like to compare. Since it works by comparing raw pixels, I guess it'll work with complicated PDFs.
Now "working" does not mean it's a good result for the eye and this is why I asked for help regarding some issues.
It's not easy to decide when such a change needs review and when it doesn't
The issue is that in some cases, for example when the change is that a long sentence has been inserted in the middle of the document, the following headline and some of the first paragraph of the following section move to the next page. Then everything that follows is just marked red and the diff becomes useless.
Yes, thanks for the comment. I wanted to build something with golang :)