|
 |
pdf_stroke (PHP 3 >= 3.0.6, PHP 4, PECL) pdf_stroke -- Draws line along path Descriptionbool pdf_stroke ( resource pdfdoc )
Stroke the path with the current color and line width, and clear it.
Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.
pdf_stroke
bob at nijman dot de
02-Aug-2001 05:25
This will draw a simple rectangle...
...with a few extras.
<?php
$pdf = pdf_new();
pdf_open_file($pdf);
pdf_set_info($pdf, "Author","Bob Nijman");
pdf_set_info($pdf, "Title","www.nijman.de");
pdf_set_info($pdf, "Creator", "bob@nijman.de");
pdf_set_info($pdf, "Subject", "pdf-stuff");
pdf_begin_page($pdf, 200, 200);
pdf_setlinewidth($pdf, 5); pdf_rotate($pdf, 5); pdf_rect($pdf, 100, 100, 50, 50); pdf_stroke($pdf); pdf_end_page($pdf);
pdf_close($pdf);
$data = pdf_get_buffer($pdf);
header('Content-type: application/pdf');
header('Content-disposition: inline; filename=invoice.pdf');
header('Content-length: ' . strlen($data));
echo $data;
?>
Thanx to:
http://www.dynamicwebpages.de/50.tutorials.php?dwp_tutorialID=11
Great german (!!!) tutorial
| |