#44261 [NEW]: error in generate pdf

From: Date: Wed, 27 Feb 2008 09:55:18 +0000
Subject: #44261 [NEW]: error in generate pdf
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122738@lists.php.net to get a copy of this message
From: ali_6778 at yahoo dot com Operating system: windows PHP version: 5.2.5 PHP Bug Type: *PDF functions Bug description: error in generate pdf Description: ------------ pdf function i use from php samle for pdf but return PHP has encountered an Access Violation at 01958AA7 Reproduce code: --------------- <?php try { $p = new PDFlib(); /* open new PDF file; insert a file name to create the PDF on disk */ if ($p->begin_document("", "") == 0) { die("Error: " . $p->get_errmsg()); } $p->set_info("Creator", "hello.php"); $p->set_info("Author", "Rainer Schaaf"); $p->set_info("Title", "Hello world (PHP)!"); $p->begin_page_ext(595, 842, ""); $font = $p->load_font("Helvetica-Bold", "winansi", ""); $p->setfont($font, 24.0); $p->set_text_pos(50, 700); $p->show("Hello world!"); $p->continue_text("(says PHP)"); $p->end_page_ext(""); $p->end_document(""); $buf = $p->get_buffer(); $len = strlen($buf); header("Content-type: application/pdf"); header("Content-Length: $len"); header("Content-Disposition: inline; filename=hello.pdf"); print $buf; } catch (PDFlibException $e) { die("PDFlib exception occurred in hello sample:\n" . "[" . $e->get_errnum() . "] " . $e->get_apiname() . ": " . $e->get_errmsg() . "\n"); } catch (Exception $e) { die($e); } $p = 0; ?> -- Edit bug report at http://bugs.php.net/?id=44261&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44261&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44261&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44261&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44261&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44261&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44261&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44261&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44261&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44261&r=support Expected behavior: http://bugs.php.net/fix.php?id=44261&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44261&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44261&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44261&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44261&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44261&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44261&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44261&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44261&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44261&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44261&r=mysqlcfg

« previous php.bugs (#122738) next »