Hello,
I succeed in creating PDF files dynamically with PHP (including inserting
static PNG images), and also succeed in creating PNG images dynamically.
However, I can't insert dynamically created PNG images into PDF files,
neither with pdf_open_image_file, nor with pdf_open_png.
Is this impossible?
D o m i n i k
Example:
function putimage ($pdf, $fullfilename, $x, $y, $width) {
// init
$extension = substr($fullfilename, strrpos ($fullfilename, ".")+1);
$pdfimage = pdf_open_image_file($pdf, $extension, $fullfilename);
// define scale
$sourceimagewidth = pdf_get_value ($pdf, "imagewidth", $pdfimage);
$scale = $width / $sourceimagewidth;
// put image
pdf_place_image($pdf, $pdfimage, $x, $y, $scale);
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php