Page 1 of 1

Visual compare 2 PDFs

Posted: Fri Aug 19, 2022 7:51 pm
by joaodaffonsojr
Hi !
I´m trying to using Imagemagick to compare 2 PDF´s, but I´m getting error even if the PDF are the same!

It´s suppose to get outcode=0 if the PDF´s are the same but I´m getting :

Code: Select all

"Execute command      Job failed because outcode is nonzero, outcode = [2]"
I have set with no variables yet because on windows CMD it work´s but in Switch not.

My command line:

Code: Select all

magick compare -identify -metric MAE "D:\Enfocus\compare visual pdf\PDFIN\pdf_v1.pdf" "D:\Enfocus\compare visual pdf\PDFIN\pdf_v2.pdf" -compose src diff.pdf
Screenshot 2022-08-19 144717.png
Screenshot 2022-08-19 144717.png (16.82 KiB) Viewed 2980 times


Any help is very welcome !

Thanks

Joao

Re: Visual compare 2 PDFs

Posted: Fri Aug 19, 2022 9:12 pm
by jan_suhr
PdfToolbox has a compare function that is very reliable. You can set deltaE values for the comparison. It has its own configurator.

Re: Visual compare 2 PDFs

Posted: Mon Aug 22, 2022 8:40 am
by JimmyHartington
I think ImageMagick uses Ghostscript when working with pdfs.
So maybe it has something to do with the enviroment from the commandline not being present in Switch.

I use this commandline tool https://vslavik.github.io/diff-pdf/ for comparing pdf. Not yet integrate in Switch. But using it locally on my mac.
I do not think it uses any other external tool do it.