Live data from Hacker News

Diff-pdf: tool to visually compare two PDFs

github.com

51–60 of 85 posts

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

#51
This reminds me of a book author who posted here IIRC. He had a little tool allowing him to quickly compare two revisions of his book. For example too make sure typos fixed didn't t break havoc. I remember his tool would show in red what had changed on pages thumbnails.

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

#54
I always used DiffPDF only to read on their website: > in the view of the EU’s Cyber Resilience Act and an abundance of caution, we have withdrawn all our free software

[1]

Good to see post-cyberresilience alternatives :)

PDF diffs are really great for versioning/comparing PCB-Designs. (The only real use case I had 15 yrs back)

[1] http://www.qtrac.eu/diffpdf-foss.html

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

#55
post #54

I always used DiffPDF only to read on their website: > in the view of the EU’s Cyber Resilience Act and an abundance of caution, we have withdrawn all our free software [1] Good to see post-cyberresilience alternatives :) PDF diffs are really great for versioning/comparing PCB-Designs. (The only real use case I had 15 yrs back) [1] http://www.qtrac.eu/diffpdf-foss.html

What a convenient excuse for them to try to get people to switch to their proprietary fork.

I genuinely need a side-by-side PDF comparison tool, and the diff-pdf tool linked from the main link doesn't do that. Any thoughts?

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

#56
post #25

I like this tool better: https://www.qtrac.eu/diffpdf.html It shows the differences in the GUI side-by-side instead of overlayed.

From the github: Another option is to compare the two files visually in a simple GUI, using the --view argument: $ diff-pdf --view a.pdf b.pdf This opens a window that lets you view the files' pages and zoom in on details. It is also possible to shift the two pages relatively to each other using Ctrl-arrows (Cmd-arrows on MacOS). This is useful for identifying translation-only differences.

Shifting the offset is very far from the experience of a side-by-side diff, and more useful for nudging the images to align them.

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

#57
post #22
post #8

Crazy, I'd have thought that modern multi-modal LLMs can do this, but when I tried Gemini, ChatGPT-4o and Claude they all pooped out: - Gemini at first only diff'd the text, and then when pushed it identified the items in the images and then hallucinated the differences between the versions. It could not produce an image output. - Claude only diff'd the text and refused to believe that there images in the PDFs. - Cha…

Visually comparing two PDFs is something a PC can do deterministically without any resource (and energy) intensive LLMs. People will soon use LLMs for things they are not especially good or efficient at, like computing the sum of numbers in an Excel table... (or are they doing it already?).

As a bonus, they'll get a result that looks likely.

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

#58
This inspired me to have Claude 3.5 Sonnet knock out a quick web page prototype for me, using PDF.js to load and render the PDFs to canvas elements and then display visual diffs between their pages.

Two prompts:

    Build a tool where I can drag and drop on two PDF files and
    it uses PDF.js to turn each of their pages into canvas
    elements and then displays those pages side by side with a
    third image that highlights any differences between them, if
    any differences exist

    rewrite that code to not use React at all
Here's the result: https://tools.simonwillison.net/compare-pdfs

It actually works quite well! Screenshot here: https://gist.github.com/simonw/9d7cbe02d448812f48070e7de13a5...

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

#59

Earlier quoted context omitted.

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.

What are BC features that you find to be so great? I'm genuinely curious - I heard of lot of BC being 'the tool' for diffing. I'm used to Meld, but my current employee has a pretty strict policy which tools could be used so at some point I've managed a licence for some older version of BC. But for some reason I've found its UI/the way it works a bit less optimal that I was accustomed for. Since I'm using that primari…

In comparison, Meld is not stable, nor fast, especially for big diffs. The UI is also more limited. Araxis Merge and WinMerge are good alternatives
Post reply on HN