Advertisements

Archive for December 3rd, 2018

Imagemagick 6 vs. PDF

Come to find out Xubuntu 18.04 ratcheted the ImageMagick security settings up to a dangerous chattering whine:

convert p???.jpg "Machining D-bit Drills.pdf"
convert-im6.q16: not authorized `Machining D-bit Drills.pdf' @ error/constitute.c/WriteImage/1037.

Fortunately, someone who understands this stuff encountered the problem before I did and posted a great description of the solution.

To forestall link rot, the process looks like:

cd /etc/ImageMagick-6/
sudo cp policy.xml policy.xml.base
sudo nano policy.xml
… change one line …
 policy domain="coder" rights="read|write" pattern="PDF"

It is completely unclear to me whether ImageMagick (as of ImageMagick 6.9.7-4 Q16 x86_64 20170114 ) requires or merely tolerates the vertical bar in place of commas, nor whether it’s in my best interest to replace "coder" with "*".

In any event, I can once again stuff bitmap images into PDF files.

Advertisements

2 Comments