[PHP] need advice on project...

2001-07-24 Thread Michael Geier, CDM Systems Admin

Project needs:
create document on fly to fax to 100+ customers
document will be queued up twice daily for submission
document will have a logo branded @ top of  page

Services used:
RedHat 7.1
HylaFax 4.1
PHP 4.0.6

Any insight would be appreciated.
I figure I will have to configure PHP with:
--with-pdflib
--with-jpeg-dir
--with-tiff-dir
--with-png-dir
--with-zlib-dir

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

---
Michael Geier
CDM Sports, Inc. - Systems Administrator
email: [EMAIL PROTECTED]
phone: 314.991.1511 x 6505
pager: 314.318.9414


-- 
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]




Re: [PHP] need advice on project...

2001-07-24 Thread Rasmus Lerdorf

 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_open_file($pdf);
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);

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

-Rasmus


-- 
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]