ImageMagick无法在WSL上将PDF转换为图像

3
我尝试使用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文件。我的问题是,我不知道在WSL中在哪里找到该文件:我尝试在/etc/中查找,并使用find命令和Windows搜索,但无济于事。有没有办法在WSL上解决这个问题?

请参见 https://dev59.com/pVQJ5IYBdhLWcg3w5aIc#52863413。 - fmw42
1个回答

5
你可以像这样找到它:
identify -list configure | grep CONFIGURE_PATH

如果找不到答案,可以使用此链接搜索。

如果还是找不到,可以在您的WSL环境中使用以下命令查找:

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

如果找不到,可以使用 Windows 的搜索功能来查找名为 policy.xml 的文件。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接