If knowledge is power, then sharing knowledge is ultimate powertrip
You are here: Home >> PHP >> Convert pdf to png ImageMagick

Convert pdf to png ImageMagick

Convert pdf to png imagemagick can be done as

convert input.pdf output.png

Or if you have PHP5 and the ImageMagik library…

$image = new Imagick(‘input.pdf[pagenumber]’);
$image->setResolution( 300, 300 );
$image->setImageFormat( “png” );
$image->writeImage(‘output.png’);

About Jawed Shamshedi

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Scroll To Top