#34929 [NEW]: Apache crash when using a pdf function
| From: | guillaume dot delbar at worldonline dot fr | Date: | Thu, 20 Oct 2005 10:11:56 +0000 |
| Subject: | #34929 [NEW]: Apache crash when using a pdf function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-86801@lists.php.net to get a copy of this message | ||
From: guillaume dot delbar at worldonline dot fr
Operating system: Win 2k/Xp
PHP version: 4.4.0
PHP Bug Type: PDF related
Bug description: Apache crash when using a pdf function
Description:
------------
Hello,
I'm trying to generate a PDF file who contains unicode characters. If i do
this :
$fontdir = "C:/my/font/dir";
pdf_set_parameter($pdf, "FontOutline",
"ArialUnicode=$fontdir/ARIALUNI.TTF");
$font = pdf_findfont($pdf, "ArialUnicode", "winansi", 0);
My chinese characters are not correctly showed (è¿oe离ç«å¤)
So i tried this :
$fontdir = "C:/my/font/dir";
pdf_set_parameter($pdf, "textformat", "utf8");
pdf_set_parameter($pdf, "FontOutline",
"ArialUnicode=$fontdir/ARIALUNI.TTF");
$font = pdf_findfont($pdf, "ArialUnicode", "winansi", 0);
And then Apache (1.3.33) crashed whith the message "Apache.exe has
generated errors and will be closed by Windows"
I think there is a problem with `pdf_set_parameter($pdf, "textformat",
"utf8");`
But PDFlib or PHP bug ? I don't know !
Regards
Reproduce code:
---------------
$pdf = pdf_new();
pdf_open_file($pdf);
$fontdir = "C:/my/font/dir";
pdf_set_parameter($pdf, "textformat", "utf8");
pdf_set_parameter($pdf, "FontOutline",
"ArialUnicode=$fontdir/ARIALUNI.TTF");
$font = pdf_findfont($pdf, "ArialUnicode", "winansi", 0);
pdf_setfont($pdf, $font, 24);
pdf_show_xy($pdf, "Chinese chars provided from a DB", 50, 750);
Expected result:
----------------
Correct PDF file
--
Edit bug report at http://bugs.php.net/?id=34929&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34929&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34929&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34929&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34929&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34929&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34929&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34929&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34929&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34929&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34929&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34929&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34929&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34929&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34929&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34929&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34929&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34929&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34929&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34929&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34929&r=mysqlcfg