I am trying to compare 2 pdf files in Linux, using imagemagick and pdftk to produce an output file showing the difference as red pixels.
I have looked at: PDF compare on linux command line and How to compare 2 PDF files
I installed imagemagick and pdftk, to use with the compare command:
compare -verbose -debug coder $PDF_1 $PDF_2 -compose src $OUT_FILE.tmp
pdftk $OUT_FILE.tmp background $PDF_1 output $OUT_FILE
On attempting the compare command:
compare -verbose -debug coder SQK_2012_4th_Ed.pdf Subquantum_kinetics__6th_edition_4c.pdf -compose src SQK_output.tmp pdftk SQK_output.tmp background SQK_2012_4th_Ed.pdf output SQK_output
I get output:
compare-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/413.
compare-im6.q16: unable to open image `SQK_output.tmp': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: unable to open image `SQK_output.tmp': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: no decode delegate for this image format `TMP' @ error/constitute.c/ReadImage/572.
compare-im6.q16: unable to open image `pdftk': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: unable to open image `pdftk': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572.
compare-im6.q16: unable to open image `SQK_output.tmp': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: unable to open image `SQK_output.tmp': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: no decode delegate for this image format `TMP' @ error/constitute.c/ReadImage/572.
compare-im6.q16: unable to open image `background': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: unable to open image `background': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572.
compare-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/413.
compare-im6.q16: unable to open image `output': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: unable to open image `output': No such file or directory @ error/blob.c/OpenBlob/2874.
compare-im6.q16: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572.
Can someone prompt me in the right direction to solve this?