ImageMagick: "convert not authorized" error

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....

ImageMagick: "convert not authorized" error

Postby peter_b » Mon Feb 18, 2019 6:31 pm

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

  • 0

User avatar
Posts: 315
Joined: Tue Nov 12, 2013 2:05 am
Reputation: 3

Return to Knowledge Base

Who is online

Users browsing this forum: No registered users and 4 guests

Who is online over last 24 hours

Users browsed this forum in the last 24 hours: No registered users and 8 guests

Reputation System ©'