Am Tue, May 02, 2023 at 03:07:30PM -0600 schrieb the...@sys-concept.com:
Trying to use convert and getting security policy problem:
convert -density 300 document.pdf -fuzz 10% -channel rgba -fill none -opaque "#d2d2d2"
-opaque "#b8b8b8" daily_appointment.pdf
convert: attempt to perform an operation not allowed by the security policy
`PDF' @ error/constitute.c/IsCoderAuthorized/449.
convert: no images defined `daily_appointment.pdf' @
error/convert.c/ConvertImageCommand/3342
Which security policy is it? Output of: cat /etc/ImageMagick-7/policy.xml
<policymap>
<!-- https://www.kb.cert.org/vuls/id/332928 mitigation /
https://bugs.gentoo.org/664236 -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
By default conversion to pdf are forbidden. You may want to read the gentoo bug
indicated in the file and if you still want to allow convert to create pdf
files, remove or comment the line with pattern="PDF".