Visual compare 2 PDFs

Post Reply
joaodaffonsojr
Member
Posts: 23
Joined: Wed Sep 08, 2021 4:36 pm

Visual compare 2 PDFs

Post 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 2830 times


Any help is very welcome !

Thanks

Joao
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Visual compare 2 PDFs

Post 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.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
User avatar
JimmyHartington
Advanced member
Posts: 282
Joined: Tue Mar 22, 2011 7:38 am

Re: Visual compare 2 PDFs

Post 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.
Post Reply