05
Oct
12

How to Convert PDF to JPG in PHP

$dir = "./covert";

$pdf = $dir."/file.pdf";
$gambar = $dir."/gambar.jpg";
exec('convert "'.$pdf.'" -colorspace RGB -resize 800 "'.$gambar.'"', $output, $return_var);

if($return_var == 0) echo "Conversion OK";
else echo "Conversion failed.<br />".$output;

0 Responses to “How to Convert PDF to JPG in PHP”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Latest Tweets

October 2012
S M T W T F S
« Jul   Mar »
 123456
78910111213
14151617181920
21222324252627
28293031  

Blog Stats

  • 47,320 hits

%d bloggers like this: