title: No decode delegate for this image format `PDF'
body: <p><a href="https://i.stack.imgur.com/LdcO5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LdcO5.png" alt="enter image description here"></a></p>
  
  <p>I'm trying to convert some PDFs to jpegs using imagemagick . I'm working on win 10, 64 with python 3.62 - 64 bit and wand 0.4.4. I've been able to get wand working with ImageMagick-6.9.9-Q16-HDRI. I've set the Path and MAGICK_HOME env vars  to </p>
  
  <pre><code>E:\ImageMagick-6.9.9-Q16-HDR
  </code></pre>
  
  <p>This allow:</p>
  
  <pre><code>from wand.image import Image
  </code></pre>
  
  <p>to work.</p>
  
  <p>My script:</p>
  
  <pre><code>import os
  magick_home=os.getcwd() + os.sep + "E:\ImageMagick-6.9.9-Q16-HDR"
  os.environ["PATH"] += os.pathsep + magick_home + os.sep
  os.environ["MAGICK_HOME"] = magick_home
  os.environ["MAGICK_CODER_MODULE_PATH"] = magick_home + os.sep + "modules" + os.sep + "coders"
  
  from wand.image import Image
  
  .....
  
  file_path = os.path.dirname(os.path.abspath(__file__))+os.sep+"myfile.pdf"
  
  image_pdf = Image(filename=file_path, resolution=300)
  image_jpeg = image_pdf.convert('jpeg')
  </code></pre>
  
  <p>I'm getting:</p>
  
  <pre><code>  File "ocr_test.py", line 38, in &lt;module&gt;
      image_pdf = Image(filename=file_path, resolution=300)
    File "e:\Myenv\lib\site-packages\wand\image.py", line 2744, in __init__
      self.read(filename=filename, resolution=resolution)
    File "e:\Myenv\lib\site-packages\wand\image.py", line 2822, in read
      self.raise_exception()
    File "e:\Myenv\lib\site-packages\wand\resource.py", line 222, in raise_exception
      raise e
  wand.exceptions.MissingDelegateError: no decode delegate for this image format `PDF' @ error/constitute.c/ReadImage/504
  </code></pre>
  
  <p>How can I get this working?</p>
  
  <p>EDIT:</p>
  
  <p>Following your advice, I followed <a href="https://glenbambrick.com/2017/01/10/pdf-to-jpg-conversion-with-python-for-windows/" rel="nofollow noreferrer">https://glenbambrick.com/2017/01/10/pdf-to-jpg-conversion-with-python-for-windows/</a> and installed ghostscript 9.22 - 32 bit. (I understand that the 64 bit won't work <a href="https://stackoverflow.com/questions/13984357/pythonmagick-cant-find-my-pdf-files/13986768#13986768">PythonMagick can&#39;t find my pdf files</a>)
  I've set both Path and MAGICK_HOME env vars  to contain:</p>
  
  <pre><code>E:\ImageMagick-6.9.9-Q16-HDR;E:\gs9.22\bin
  </code></pre>
  
  <p>I ran:</p>
  
  <pre><code>$ E:/ImageMagick-6.9.9-Q16-HDRI/convert --version
  Version: ImageMagick 6.9.9-23 Q16 x64 2017-11-12 http://www.imagemagick.org
  Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
  License: http://www.imagemagick.org/script/license.php
  Visual C++: 180040629
  Features: Cipher DPC HDRI Modules OpenMP
  Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps raw rsvg tiff webp xml zlib
  </code></pre>
  
  <p>I don't see gs or gslib. What should I do next?</p>