Re: PDF and dynamic PNG

From: Date: Tue, 27 Jan 2004 22:10:44 +0000
Subject: Re: PDF and dynamic PNG
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-175983@lists.php.net to get a copy of this message
if nothing worked out, simply right the dynamic png to a temp file (e.g tempimg.png) then include this png file in your PDF document :) hope this helps, Ammar "Dominik Heeb" <heeb@datacomm.ch> wrote in message news:20040127121202.45703.qmail@pb1.pair.com... > 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); > }

« previous php.general (#175983) next »