#25401 [Opn->Fbk]: pdflib does not generate pdf

From: Date: Sat, 06 Sep 2003 14:05:47 +0000
Subject: #25401 [Opn->Fbk]: pdflib does not generate pdf
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-47143@lists.php.net to get a copy of this message
ID: 25401 Updated by: sniper@php.net Reported By: sj at ewetel dot de -Status: Open +Status: Feedback Bug Type: PDF related Operating System: Solaris 2.8 PHP Version: 4.3.3 New Comment: Works fine for me with PHP 4.3.3 (and latest CVS too). What configure line did you use? What if you run the script on command line (using CLI)? Are you sure you're not getting some error there? etc. etc. Previous Comments: ------------------------------------------------------------------------ [2003-09-06 09:19:47] sj at ewetel dot de Description: ------------ Since Upgrading to 4.3.3 the supplied test script does not generate any output. A telnet session gives only "0" back as body, last known working version is php4-STABLE-200303261230. Tried with pdflib 4.0.3 (.so) and 5.0.1 (.a) same error with both, nothing to see in the logs. Reproduce code: --------------- <?php $p = PDF_new(); PDF_open_file($p, ""); PDF_set_info($p, "Creator", "hello.php"); PDF_set_info($p, "Author", "Rainer Schaaf"); PDF_set_info($p, "Title", "Hello world (PHP)"); PDF_begin_page($p, 595, 842); # Change "host" encoding to "winansi" or whatever you need! $font = PDF_findfont($p, "Helvetica-Bold", "host", 0); PDF_setfont($p, $font, 18.0); PDF_set_text_pos($p, 50, 700); PDF_show($p, "Hello world!"); PDF_continue_text($p, "(says PHP)"); PDF_end_page($p); PDF_close($p); $buf = PDF_get_buffer($p); $len = strlen($buf); header("Content-type: application/pdf"); header("Content-Length: $len"); header("Content-Disposition: inline; filename=hello.pdf"); print $buf; PDF_delete($p); ?> Expected result: ---------------- The generated PDF should show up in the browser. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25401&edit=1

« previous php.bugs (#47143) next »