PDF document with Japanese characters
"Durgaprasada Kalluraya" <[email protected]>
| Newsgroups | gmane.comp.php.internationalization |
|---|---|
| Message-ID | <[email protected]> |
Hi, I am trying to create a PDF document containing the japanese charcters. But I am having problem with that. Some japanese charcters are missing in the PDF generated. The characters which does not get displayed are ?,??etc. Is this encoding problem or font problem? I had the same problem while creating a image which had these charcters. The settings which I am going to use finally are, 1) The text content, which needs to be put in PDF will come from the database. 2) php.ini file settings are, gd GD Support => enabled GD Version => 2.0 or higher FreeType Support => enabled FreeType Linkage => with TTF library JPG Support => enabled PNG Support => enabled WBMP Support => enabled mbstring Multibyte Support => enabled Japanese support => enabled Directive => Local Value => Master Value mbstring.detect_order => no value => no value mbstring.encoding_translation => Off => Off mbstring.func_overload => 0 => 0 mbstring.http_input => pass => pass mbstring.http_output => pass => pass mbstring.internal_encoding => none => none mbstring.language => neutral => neutral mbstring.substitute_character => no value => no value pdf PDF Support => enabled PDFlib GmbH Version => 4.0.3 Revision => $Revision: 1.112.2.2 $ The PHP code is as follows, <?php $fp = fopen( "test.pdf", "w"); $pdf = PDF_open($fp); PDF_begin_page($pdf, 400, 200); pdf_set_text_rendering($pdf, 2); pdf_set_font($pdf, "HeiseiMin-W3", 30, "EUC-H"); PDF_show_xy($pdf, "??????????", 10,150); pdf_set_font($pdf, "HeiseiKakuGo-W5", 30, "EUC-H"); PDF_show_xy($pdf, "??????????", 10,100); PDF_end_page($pdf); PDF_close($pdf); fclose($fp); ?> <a href="test.pdf">finished</a> How to solve this problem? If it is font related issue how do I install new fonts in PDFLib? If this encoding related issue then I would like read some article about encoding coversions and possible character loss. Is there any link available? Can any one help me? -- PHP Internationalization Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php