I am assuming that u r done with image creation on the fly...
tell me if u need to know how to create image too..
to embed that image into a pdf file use this:
<?php
$pdf = pdf_new();
pdf_open_file($pdf, "filename.pdf");
pdf_begin_page($pdf, 595, 842); //sets pdf size 595*842 is A4
$png_image = pdf_open_png($pdf, "image.png"); //image that u want to embed. u can also use pdf_open_image instead
pdf_place_image($pdf, $png_image, 200, 300, 1.0); //parameters: pdf file, image file, x pos, y pos, scale
pdf_close_image($pdf, $png_image);
pdf_end_page($pdf);
pdf_close($pdf);
hope this helps.. cheers !!
Hi All,
I'm looking for a technique how to save image generated from php to png/jpg/gif, save the image to the server. Later, I want to include the image file to a pdf file generated from a php code.
I'm referring the image generated php from HERE