Install ImageMagick and GhostScript first before using the code below.
<?php
$im = new imagick(‘file.pdf[0]‘);
$im->setImageFormat( “jpg” );
header( “Content-Type: image/jpeg” );
echo $im;
?>
The file.pdf[0] means page 1 of the file.
No one has commented yet.
You must be logged in to post a comment.
Comments
Leave a comment Trackback