Finds differences between two PDF documents:
- Compares the text layers of two PDF documents and outputs the bounding boxes of changed text in JSON.
- Rasterizes the changed pages in the PDFs to a PNG and draws red outlines around changed text.
The script is written in Python 3, and it relies on the pdftotext
program.
libxml2, libxslt, poppler
sudo python3 setup.py install
Turn two PDFs into one large PNG image showing the differences:
pdf-diff before.pdf after.pdf > comparison_output.png