Live data from Hacker News

Diff-pdf: tool to visually compare two PDFs

github.com

11–20 of 85 posts

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

#12
post #4

Interestingly, Github thinks the project is 46% shell, due to the fairly huge wxwin.m4.

I noticed this a while back with a private project of mine. The Github languages breakdown seems broken. Mine is a Python project with a handful of Jupyter notebooks but many many python files. The LOC must be 80% python files but Github sees the project as 50% Jupyter.

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

#13
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…

This is definitely not a strength for multi-modal LLM. Multi-modal capabilities are still too flaky especially when looking at a page of a PDF which can have multiple areas of focus.

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

#16
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…

This may be the type of thing that LLMs are currently the worst at. I'm not surprised at all.

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

#20

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!

could you not just compare the source (or perhaps even the hash) of the PDF and assert on that?
Post reply on HN