title: Converting a PDF to PNG
body: <p>I'm trying to convert a PDF to a PNG image (at least the cover of one). I'm successfully extracting the first page of the PDF with pdftk. I'm using imagemagick to do the conversion:</p>
  
  <pre><code>convert cover.pdf cover.png
  </code></pre>
  
  <p>This works, but unfortunately the cover.png comes through incorrectly rendered (some of the alpha object in the PDF aren't rendered properly). I know ImageMagick uses GhostScript to do the conversion and if I do it directly with gs I can get the desired results, but I'd rather use the convert library as it has other tools I'd like to leverage.</p>
  
  <p>This command in GhostScript accomplishes the desired image:</p>
  
  <pre><code>gs -sDEVICE=pngalpha -sOutputFile=cover.png -r144 cover.pdf
  </code></pre>
  
  <p>I'm wondering is there any way to pass arguments through convert to GhostScript or am I stuck with calling GhostScript directly?</p>