1

I maintain qr-backup, a program which makes some PDFs.

My users are encountering a bug where convert fails on PDFs. Why and how to fix it is explained here. imagemagick - convert not allowed

What's a simple, fast test I can do (for example with convert) to tell whether they're being hit by this policy issue? I'd like to print them a clearer error if they're on an affected OS.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122

1 Answers1

0

Check the exit status code below (0 for no policy problem)

convert -size 1x1 canvas:white pdf:- >/dev/null

Or of this (0 indicates policy problem)

grep -s -q 'policy domain="coder" rights="none" pattern="PDF"' /etc/ImageMagick-6/policy.xml