ImageMagick 无法将 PDF 转换为 WSL 上的图像
ImageMagick unable to convert PDF to images on WSL
我正在尝试使用 ImageMagick 将 PDF 转换为图像,但出现此错误:
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: no images defined `tmp/%03d.png' @ error/convert.c/ConvertImageCommand/3258.
我找到了一堆建议修改policy.xml文件的答案(比如 and );我的问题是,我不知道在 WSL 上哪里可以找到该文件:我尝试在 /etc/ 中查找它,并在 Windows 中进行查找和搜索,但无济于事。知道如何在 WLS 上解决这个问题吗?
你可以这样找到:
identify -list configure | grep CONFIGURE_PATH
否则,请使用 this 搜索。
否则,请在您的 WSL 环境中使用 find
,如下所示:
find / -name policy.xml 2> /dev/null
否则,只需使用 Windows' 搜索来查找名为 policy.xml
的文件
我正在尝试使用 ImageMagick 将 PDF 转换为图像,但出现此错误:
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: no images defined `tmp/%03d.png' @ error/convert.c/ConvertImageCommand/3258.
我找到了一堆建议修改policy.xml文件的答案(比如
你可以这样找到:
identify -list configure | grep CONFIGURE_PATH
否则,请使用 this 搜索。
否则,请在您的 WSL 环境中使用 find
,如下所示:
find / -name policy.xml 2> /dev/null
否则,只需使用 Windows' 搜索来查找名为 policy.xml