为什么在PHP中使用FPDF不能在PDF中显示亚洲unicode字符? [英] Why are asian unicode characters not appearing on PDF using FPDF in PHP?
问题描述
我正在使用 FPDF 创建PDF和
I am using FPDF to create a PDF and tFPDF to allow for unicode characters, such as Chinese, Japanese, or Korean.
我正在使用tFPDF示例文件中的ex.php.
I am using the ex.php that was in the tFPDF example files.
我在Hello World.txt文件中添加了一些日文和中文字符,但是即使以默认的DejaVu字体显示,这些字符也不会显示.
I added some Japanese and Chinese Characters to the Hello World.txt file, but those characters are not showing up, even in the default DejaVu font that was included.
我需要怎么做才能显示日语,汉语,朝鲜语等其他字符?
What do I need to do to make other characters like Japanese, Chinese, Korean show up?
推荐答案
fpdf有一个多字节版本,称为 mbfpdf (我想免费提供).使用该字体和PGOTHIC字体,可以显示亚洲字符.我自己使用此类(mbfpdf)创建了一些pdf文件,效果很好.
There is a multi byte version of fpdf called mbfpdf (freely available I suppose). With that and the PGOTHIC font, it is possible to display Asian characters. I have used this class (mbfpdf) to create a few pdf files myself and it worked well.
这篇关于为什么在PHP中使用FPDF不能在PDF中显示亚洲unicode字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!