how to format the pdf to jpg use the MagickWand

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
287169540

how to format the pdf to jpg use the MagickWand

Post 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 );
?>
Post Reply