News for hackers. Stuff that matters.
Re:Show HN: PDF-Diff - Visualize any differences between two... by iamandras on Saturday August 06, 2022 @04:53AM (#32366287)
Did you try it with more complicated PDFs?
Re:Show HN: PDF-Diff - Visualize any differences between two... by crecker on Saturday August 06, 2022 @05:03AM (#32366329)
Thanks for your comment! By complicated PDFs, what do you mean exactly? A lot of pages? With forms? I've tried with standard technical books I have bought.

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.

Re:Show HN: PDF-Diff - Visualize any differences between two... by mr_mitm on Saturday August 06, 2022 @09:03AM (#32367729)
ImageMagick's `compare` can do this as well, on a pixel-level.

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.

Re:Show HN: PDF-Diff - Visualize any differences between two... by crecker on Saturday August 06, 2022 @09:05AM (#32367738)
> ImageMagick's `compare` can do this as well, on a pixel-level.

Yes, thanks for the comment. I wanted to build something with golang :)

Re:Show HN: PDF-Diff - Visualize any differences between two... by kzrdude on Saturday August 06, 2022 @09:00AM (#32367709)
Aha. If one paragraph is added on page 1, it might show a diff on every following page in the same chapter after that, if it causes things to shift?

It's not easy to decide when such a change needs review and when it doesn't

Re:Show HN: PDF-Diff - Visualize any differences between two... by crecker on Saturday August 06, 2022 @09:03AM (#32367728)
Yes, if it causes things to shift, the tool shows every page red. This tool is meant to be ran in the final phase of typesetting, the moment when you want to focus attention on details (e.g. spacing).