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
I used curl to save image generated from php. Save into the server and retrieve the image and insert into a pdf file generated by php.
Thx
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
Hi,
Some how the pdf generator cannot take image generated by php. So, I have to save the image generated by php to a directory and grab the image put it in pdf generator.
Wonderful.
Nash
nice..
Hi,
Some how the pdf generator cannot take image generated by php. So, I have to save the image generated by php to a directory and grab the image put it in pdf generator.Wonderful.
Nash
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.