Re:Show HN: PDF-Diff - Visualize any differences between two...
by bob1029 on Saturday August 06, 2022 @09:46AM
(#32368034)
Rasterization prior to comparison is a really clever idea. Doing this with PDF spec code would be an absolute nightmare. Checking 2 bitmaps for equality is just a few lines of code.
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.
Re:Show HN: PDF-Diff - Visualize any differences between two...
by markrages on Saturday August 06, 2022 @04:00PM
(#32371074)
I wrote a tool to do this for circuit board artwork changes. It used gerbv to rasterize the vector (gerber) files, then used XOR on the pixels to make unchanged areas disappear. For such a simple tool it is quite useful.
Re:Show HN: PDF-Diff - Visualize any differences between two...
by crecker on Saturday August 06, 2022 @08:37AM
(#32367544)
> 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.
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.