Re: output using ClibPDF is blank - RESENT in ASCII
| From: | Richard Lynch | Date: | Sun, 09 Sep 2001 00:24:49 +0000 |
| Subject: | Re: output using ClibPDF is blank - RESENT in ASCII | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66555@lists.php.net to get a copy of this message | ||
take out the header, and see if you have any error messages.
I'm also willing to bet that cdpf_open() returns some special values for
error -- Your code should check that.
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Don <don@lclcan.com>
Newsgroups: php.general
To: php list <php-general@lists.php.net>
Sent: Thursday, September 06, 2001 3:52 PM
Subject: output using ClibPDF is blank - RESENT in ASCII
> 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);
>