Skip to content

Instantly share code, notes, and snippets.

@yratof
Last active December 16, 2015 13:29
Show Gist options
  • Save yratof/5442018 to your computer and use it in GitHub Desktop.
Save yratof/5442018 to your computer and use it in GitHub Desktop.
Imagemagick convert PDF to JPG
<?php
if ( !file_exists( $dest_path ) ) {
$myurl = $file_path.'[0]';
$image = new Imagick($myurl);
$image->setResolution( 300, 300 );
$image->setImageFormat( "png" );
$image->writeImage($dest_path);
};
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment