> Does any one have any good code for creating PDF's on the fly with graphic
> images?

Putting an image in a PDF is trivial:

$pdf = pdf_new();
pdf_begin_page($pdf, 612, 792); // US-Letter size

$x = 5; $y = 792-72;
$scale = 0.5;

$im = pdf_open_jpeg($pdf, "logo.jpg");
pdf_place_image($pdf, $im, $x, $y, $scale);
pdf_close_image ($pdf,$im);

$data = pdf_get_buffer($pdf);
header('Content-type: application/pdf');
header('Content-disposition: inline; filename=fax.pdf');
header('Content-length: ' . strlen($data));
echo $data;


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to