Page 1 of 1

ImageMagick: "convert not authorized" error

PostPosted: Mon Feb 18, 2019 6:31 pm
by peter_b
Converting several PNGs into a PDF using Imagemagick, I get the following error:
convert: not authorized `output.pdf' @ error/constitute.c/WriteImage/1028

Although the command is valid, checked, correct and everything:
Code: Select all
$ convert *.png -resize 1920x1920 -compress jpeg -density 150 -units PixelsPerInch -quality 65% output.pdf

  • OS is Xubuntu 16.04.3
  • ImageMagick: 8:

I haven't checked if this approach is correct (lack of time right now), but here's a quick hack:

In "/etc/ImageMagick-6/policy.xml", replace rights "none" with "read|write" for PDF. Like this:
Code: Select all
  <!-- disable ghostscript format types -->
  <policy domain="coder" rights="none" pattern="PS" />
  <policy domain="coder" rights="read|write" pattern="PDF" />
  <policy domain="coder" rights="none" pattern="EPS" />
  <policy domain="coder" rights="none" pattern="XPS" />

I never had to deal with ImageMagick policies/rights before, so use this at your own risk...