I attempted to perform what I thought was a very straightforward conversion using the command:
convert Deluge1.jpg Deluge1.pdf
I got the following error message:
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
I'm sure I've done this in the past without error. And I have no idea why there would be any security issue here.
security error trying to convert jpg to pdf
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: security error trying to convert jpg to pdf
What is your IM version and platform? Where did ImageMagick come from? How was it installed. Please see the policy.xml file for security related permissions and arguments. https://imagemagick.org/script/resources.php
Re: security error trying to convert jpg to pdf
This is on Ubuntu 19.04. dpkg -l imagemagick says:
||/ Name Version Architecture Description
+++-==============-===========================-============-=======================================
ii imagemagick 8:6.9.10.14+dfsg-7ubuntu2.2 amd64 image manipulation programs -- binaries
I've had this on my system for years. I suppose this version was installed from a routine software update.
In policy.xml I see 2 possible culprits:
1.
2.
I don't get what the rationale for this could be.
||/ Name Version Architecture Description
+++-==============-===========================-============-=======================================
ii imagemagick 8:6.9.10.14+dfsg-7ubuntu2.2 amd64 image manipulation programs -- binaries
I've had this on my system for years. I suppose this version was installed from a routine software update.
In policy.xml I see 2 possible culprits:
1.
Code: Select all
<!-- <policy domain="module" rights="none" pattern="{PS,PDF,XPS}" /> -->
Code: Select all
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: security error trying to convert jpg to pdf
The default policy precludes you from reading/writing PDF, etc. This was due to a security bug in Ghostscript, which has now been fixed. I suggest you uncomment those policies and make them rights="read|write. See if that helps.
Re: security error trying to convert jpg to pdf
Thanks. I had found some documentation about the ghostscript issue but I did not know that it had been fixed. I realized that my "culprit 1" was already commented out, so I tried simply commenting out the 2nd to last policy line (the one mentioning PDF) and that solved the problem.
-- David
-- David
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: security error trying to convert jpg to pdf
It is fixed in the current 9.27 version of GS, but that version has other bugs as does 9.26
Re: security error trying to convert jpg to pdf
I'm at 9.26. I guess that's why those policy lines are in the current copy of policy.xml on my system.