gpt4 book ai didi

python - ImageMagick 魔杖无法识别 pdf 图像?

转载 作者:太空狗 更新时间:2023-10-29 20:58:42 25 4
gpt4 key购买 nike

我正在尝试使用 this将一个 pdf 转换为 jpg 的博客文章,但是每次我尝试运行这个简单的脚本时,我都会收到此异常 wand.exceptions.WandError: wand contains no images MagickWand-56' @ error/magick-image.c/MagickWriteImage/13001

from wand.image import Image

with Image(filename="myFile.pdf") as img:
img.save(filename="myFile.png")

我使用的是最新版本的 Wand 和 Python 3.4.2。我唯一能想到的可能是版本兼容性问题。

最佳答案

所以只是为了结束这个问题,问题是在 mac 上缺少 ghostscript 库,如我上面的评论所示:

"maybe then some libraries missing. do you use linux/windows/mac? check what is required there for pdfs? ghostscript maybe? "

关于python - ImageMagick 魔杖无法识别 pdf 图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27698637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com