Comparing PDF pages automatically

I needed to compare whether two PDF documents generated from the same TeX sources where different or not, since the generation method was slightly different for both.

Trying to compare it visually would be crazy, since the document contains more than 1400 pages. So I needed an automatic way to do it.

Albert Astals Cid from the poppler mailing list suggested to use pdftoppm and diff.

The way to automatically compare PDF pages was extremely easy: convert all pages to images, compare each pages and be warned only on the different ones.

After that, it only rests to check visually which differences contain those pages which have images that don’t match.

Posted in Digital typography, PDF, TeX. Comments Off on Comparing PDF pages automatically
%d bloggers like this: