Re: Start up with ClibPDF functions
| From: | Sephiroth | Date: | Fri, 09 May 2003 08:01:33 +0000 |
| Subject: | Re: Start up with ClibPDF functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146978@lists.php.net to get a copy of this message | ||
This way works... but still have nothing appear in the PDF document
only a blank page...
<?php
$pdf = cpdf_open(0);
cpdf_page_init($pdf, 1, 0, 841.89, 595.28);
cpdf_begin_text($pdf);
cpdf_set_font($pdf, "Helvetica", 12, "WinAnsiEncoding");
cpdf_show($pdf, "Hello World");
cpdf_show_xy($pdf, "Hello World", 200, 50);
cpdf_text($pdf, "Hello World", 400, 50);
cpdf_end_text($pdf);
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);
?>