I use imagemagick and ghostscript on my windows machine running under php5 in apache.
I tried
<?php
$im = new imagick('test.pdf[0]');
$im->setImageFormat( "jpg" );
header( "Content-Type: image/jpeg" );
echo $im;
?>
and found that it was not working.
Imagick works in my php info file ...

I am trying to create a sketch without saving it to the server hard drive ...
source
share