title: ImageMagick/Imagick convert PDF to JPG using native PHP API
body: <p>I’m attempting to convert PDF files into PNGs. It works great from the command line (I do have GhostScript 8.64 installed). But from PHP I’m having a problem:</p>
  
  <p>code:</p>
  
  <pre><code>$im = new Imagick($pdf_file); // this is where it throws the exception below
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>Fatal error: Uncaught exception ‘ImagickException’ with message ‘Postscript delegate failed `23_1235606503.pdf’: No such file or directory @ pdf.c/ReadPDFImage/612′ in get_thumbnail.php:93
  Stack trace:
  \#0 get_thumbnail.php(93): Imagick-&gt;__construct(’…’)
  </code></pre>
  
  <p>etc. etc.</p>
  
  <p>I'm not sure what I'm doing wrong here, but I suspect it has something to do with my server configuration somewhere. I'm running:
  Apache 2.2.11
  PHP 5.2.8
  ImageMagick 6.4.8-9
  GhostScript 8.64</p>