output using ClibPDF is blank - RESENT in ASCII
| From: | Don | Date: | Thu, 06 Sep 2001 20:52:17 +0000 |
| Subject: | output using ClibPDF is blank - RESENT in ASCII | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-66276@lists.php.net to get a copy of this message | ||
Hi,
I am evaluating ClibPDF and have written a sample rpogram to output some text and a couple of lines
to a letter size page. However,
the when the PDF loads onto the screen, it is blank. Can anyone tell me what went wrong? The code
is below. Am running Apache
Server on RedHat Linux 6.2
Thanks,
Don
Code
------
$pdf = cpdf_open(0);
cpdf_set_creator($pdf, "bl_print.php");
cpdf_set_title($pdf, "Proof B/L");
cpdf_page_init($pdf, 1, 0, 612, 792);
cpdf_begin_text($pdf);
cpdf_set_font($pdf, "Times-Roman", 30, "WinAnsiEncoding");
cpdf_set_text_rendering($pdf, 1);
cpdf_text($pdf, "Times Roman outlined", 50, 700);
cpdf_end_text($pdf);
cpdf_moveto($pdf, 55, 757);
cpdf_lineto($pdf, 585, 757);
cpdf_moveto($pdf, 55, 754);
cpdf_lineto($pdf, 585, 754);
cpdf_finalize_page ($pdf, 1);
cpdf_finalize($pdf);
Header("Content-type: application/pdf");
cpdf_output_buffer($pdf);
cpdf_close($pdf);