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]