Re: Start up with ClibPDF functions
| From: | Sephiroth | Date: | Fri, 09 May 2003 08:38:15 +0000 |
| Subject: | Re: Start up with ClibPDF functions | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146982@lists.php.net to get a copy of this message | ||
Ok, this works much better...
<?php
$pdf = cpdf_open(0);
cpdf_page_init($pdf, 1, 0, 841.89, 595.28, 1);
cpdf_begin_text($pdf);
cpdf_set_font($pdf, "Helvetica", 12, "WinAnsiEncoding");
cpdf_set_text_pos($pdf, 10, 50);
cpdf_show($pdf, "cpdf_show(): Hello World");
cpdf_show_xy($pdf, "cpdf_show_xy(): Hello World", 10, 150);
cpdf_text($pdf, "cpdf_text(): Hello World", 10, 250);
cpdf_moveto($pdf, 100, 100);
cpdf_lineto($pdf, 300, 100);
cpdf_stroke($pdf);
cpdf_finalize_page($pdf, 1);
cpdf_finalize($pdf);
cpdf_save_to_file($pdf, "/tmp/test.pdf");
cpdf_close($pdf);
?>