Day: March 7, 2019

ImageMagick not authorized error

I was getting this error:

$ convert -density 150×150 +antialias -negate FILE1.PDF F1.png
convert-im6.q16: not authorized FILE1.PDF’ @ error/constitute.c/ReadImage/412. convert-im6.q16: no images defined F1.png’ @ error/convert.c/ConvertImageCommand/3258.

I found the solution here: https://stackoverflow.com/questions/52861946/imagemagick-not-authorized-to-convert-pdf-to-an-image/52863413#52863413

/etc/ImageMagick-6/policy.xml

policy domain=”coder” rights=”read|write” pattern=”PS”
policy domain=”coder” rights=”read|write” pattern=”EPI”
policy domain=”coder” rights=”read|write” pattern=”PDF”
policy domain=”coder” rights=”read|write” pattern=”XPS”