【问题标题】:ImageMagick unable to convert PDF to images on WSLImageMagick 无法在 WSL 上将 PDF 转换为图像
【发布时间】:2021-08-10 22:36:37
【问题描述】:

我尝试使用 ImageMagick 将 PDF 转换为图像,但出现此错误:

convert-im6.q16:尝试执行安全策略“PDF”@error/constitute.c/IsCoderAuthorized/408 不允许的操作。

convert-im6.q16:没有定义图像 `tmp/%03d.png' @error/convert.c/ConvertImageCommand/3258。

我找到了一堆建议修改 policy.xml 文件的答案(如thisthis);我的问题是,我不知道在 WSL 上哪里可以找到该文件:我尝试在 /etc/ 中查找它,并在 Windows 中查找和搜索,但无济于事。知道如何在 WLS 上解决这个问题吗?

【问题讨论】:

标签: imagemagick windows-subsystem-for-linux


【解决方案1】:

你可以这样找到它:

identify -list configure | grep CONFIGURE_PATH

如果失败,请使用 this 搜索。

如果做不到这一点,请在您的 WSL 环境中使用 find,如下所示:

find / -name policy.xml 2> /dev/null

如果失败,只需使用 Windows 的搜索来查找名为policy.xml 的文件

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-09-12
    • 2011-09-29
    • 1970-01-01
    • 1970-01-01
    • 2014-11-24
    • 2019-03-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多