note 15786 added to function.pdf-open
| From: | andre at tomdeedom dot com | Date: | Wed, 03 Oct 2001 06:57:15 +0000 |
| Subject: | note 15786 added to function.pdf-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18492@lists.php.net to get a copy of this message | ||
Wel pdf_open() could give a problem use pdf_new() and pdf_open_file() in combination with echo
""; do not forget to echo 'cause the pdf 'll stay empty in that case :)
axample:
<?php
$pdf = pdf_new();
pdf_open_file($pdf);
pdf_begin_page($pdf, 595, 842);
pdf_set_font($pdf, "Times-Roman", 30, "host");
pdf_set_value($pdf, "textrendering", 1);
pdf_show_xy($pdf, "A PDF document created in memory!", 50, 750);
pdf_end_page($pdf);
pdf_close($pdf);
$data = pdf_get_buffer($pdf);
header("Content-type: application/pdf");
header("Content-disposition: inline; filename=test.pdf");
header("Content-length: " . strlen($data));
echo $data;
?>
--
http://www.php.net/manual/en/function.pdf-open.php
http://master.php.net/manage/user-notes.php?action=edit+15786
http://master.php.net/manage/user-notes.php?action=delete+15786
http://master.php.net/manage/user-notes.php?action=reject+15786