ImageMagick安全策略"PDF"阻止转换 [英] ImageMagick security policy 'PDF' blocking conversion

查看:1173
本文介绍了ImageMagick安全策略"PDF"阻止转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Imagemagick安全策略似乎不允许我执行从pdf到png的转换.转换其他扩展名似乎可以正常工作,只是不能从pdf中转换.自安装它以来,我没有更改任何imagemagick设置...如果操作系统很重要,我正在使用Arch Linux.

The Imagemagick security policy seems to be not allowing me perform this conversion from pdf to png. Converting other extensions seem to be working, just not from pdf. I haven't changed any of the imagemagick settings since I installed it... I am using Arch Linux, if the OS matters.

user@machine $ convert -density 300 -depth 8 -quality 90 input.pdf output.png
convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
convert: no images defined `output.png' @ error/convert.c/ConvertImageCommand/3288.

推荐答案

好吧,我添加了

  <policy domain="coder" rights="read | write" pattern="PDF" />

恰好在/etc/ImageMagick-7/policy.xml中的</policymap>之前,这使其可以再次工作,但不确定其安全性.

just before </policymap> in /etc/ImageMagick-7/policy.xml and that makes it work again, but not sure about the security implications of that.

这篇关于ImageMagick安全策略"PDF"阻止转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆