Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 988
BarFooBar Avatar asked Dec 30 '14 01:12

BarFooBar


1 Answers

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? "

like image 81
Marcin Avatar answered Oct 16 '22 09:10

Marcin