Topic: CHINESE LANGUAGE ISSUE - ONLY HAPPEN ON INVOICE
Hi,
I have made changes to the respective files and mysql structure to UTF8 so as to cater for Chinese characters entry and output as required by our users. And I have successfully made it work. But I discovered an issue when printing Invoice. And this issue only happened on printing Invoice but not on other documents such as SO, PO, DO when the home currency and the Invoice currency are different.
Here were what I did to make the system works with Chinese characters:
- Downloaded the font files: chinese_simplified_cid0, unzipped and place them in reporting/fonts directory
- Updated the reporting/includes/class.pdf.inc
case "ar_EG" : $fontname = "ae_tholoth"; break;
case "zh_CN" : $fontname = "gbsn00lp"; break;
case "zh_TW" : $fontname = "chinese_traditional_cid0"; break;
default : $fontname = "chinese_simplified_cid0"; break;
- Updated the encoding in lang\installed_languages.inc with UTF8
$installed_languages = array (
0 =>
array (
'code' => 'C',
'name' => 'English',
'encoding' => 'utf-8',
- Changed the character set to UTF8.
With this, the system with English Interface allows of Chinese Characters input and print. We did not encounter any problem when printing PO, SO, Delivery Note with the Chinese Items, Customer names, addresses...etc. However, we have a problem with Invoice when the home and invoice currencies are different and I will get an error "TCPDF error: Unsupported font type:" when printing the Invoice. When I change the currency to match with the invoice currency, then it has no problem of printing.
Would someone advise how to solve the problem.
Thank you.
/Mark