Page 1 of 1

how to format the pdf to jpg use the MagickWand

Posted: 2009-09-11T20:26:14-07:00
by 287169540
// the code

<?php
$resource = NewMagickWand();
MagickReadImage( $resource, './zjpg/example_001.pdf' );
MagickResizeImage( $resource, 200, 100, MW_QuadraticFilter, 1.0 );
//MagickSetImageFormat( $resource, 'pdf' );
MagickSetFormat( $resource, 'jpg' );
//header( 'Content-Type: image/gif' );
MagickEchoImageBlob( $resource );
?>