Comparing the output from two PDF Chemistry versions
Posted: Tue Feb 23, 2021 3:10 pm
Hi folks,
I wanted a way to test a new version of PDF Chemistry against my current version of PDF Chemistry to see if the PDF output was different. So I wrote this utility:
https://github.com/chrispy-snps/compare-pdf-images
This utility compares two PDF files by rendering them to bitmap images (multipage TIFF files), then compares the images for pixel-level differences. In this way, cosmetic CSS differences like padding/font/style differences are detected.
On top of the basic compare_pdf_images.pl script, I wrote an additional bash shell script at
https://github.com/chrispy-snps/compare ... ersions.sh
to run a full output regression test for all our books to see if I need to update our CSS to account for any changes in the new PDF Chemistry version. This also allows me to test if I can safely remove workarounds from our CSS once a bug is fixed.
I wanted a way to test a new version of PDF Chemistry against my current version of PDF Chemistry to see if the PDF output was different. So I wrote this utility:
https://github.com/chrispy-snps/compare-pdf-images
This utility compares two PDF files by rendering them to bitmap images (multipage TIFF files), then compares the images for pixel-level differences. In this way, cosmetic CSS differences like padding/font/style differences are detected.
On top of the basic compare_pdf_images.pl script, I wrote an additional bash shell script at
https://github.com/chrispy-snps/compare ... ersions.sh
to run a full output regression test for all our books to see if I need to update our CSS to account for any changes in the new PDF Chemistry version. This also allows me to test if I can safely remove workarounds from our CSS once a bug is fixed.