ninnypants Posted June 18, 2009 Share Posted June 18, 2009 I'm trying to build a script that will take a list of images and combine them in a pdf but I don't seem to be able to get the images to load correctly for the pdf. pdf_load_image() says that it can take the name of a php file that creates an image, but it keeps failing on me. Can anyone see any errors in my code? [pre] $pdf = pdf_new(); pdf_open_file($pdf, md5(time()).'.pdf'); $cnt = count($commic_arr); for($i = 0; $i < $cnt; $i++){ $img = pdf_load_image($pdf, 'auto', 'image.php?com='.$comic_arr[$i], ''); echo $img; $page = pdf_begin_page($pdf, 695, 1100); pdf_fit_image($pdf, $img, 0, 0, ''); pdf_close_image($pdf, $img); pdf_end_page($page); } pdf_close($pdf); [/pre] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.