creating a pdf preview
$im = new imagick('test.pdf[0]'); //1st page
$im->setImageFormat('png');
header('Content-Type: image/png');
echo $im;
more
$im = new imagick('test.pdf[0]'); //1st page
$im->setImageFormat('png');
header('Content-Type: image/png');
echo $im;
more