简体   繁体   中英

ImageMagick wand not recognizing pdf image?

I'm trying to use this blog post to convert one pdf to a jpg, however everytime I try to run this simple script I get this exception 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")

I'm using the latest version of Wand and Python 3.4.2. The only thing I can think of is possibly a version compatibility issue.

So just to close the question, the problem is missing ghostscript library on mac, as indicated in my comment above:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM