tags:

views:

82

answers:

1

I am using FPDF to create a PDF and tFPDF to allow for unicode characters, such as Chinese, Japanese, or Korean.

I am using the ex.php that was in the tFPDF example files.

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?

A: 

The API that you're using needs to provide specific support for encoding the unicode characters that you're trying to add to the document. This is done by way of a codepage / charset for those characters. There are a number of different charsets available for Japanese, Chinese and Korean characters such as Hangeul, GB2312, Chinese Big 5, Shift JIS, etc.

The API that you're using needs to support the charset that matches the text which you're trying to add.

It looks like FPDF supports some Chinese codepages since there's some info on their forum about adding text using GB2312 and Chinese Big 5, but as they don't appear to mention unicode on their main pages, my guess is that they don't provide extensive support for it.

Rowan
I did get it to work using the font Arial Unicode. The font that the example uses doesn't support CJK characters.
zeckdude