phpjasper-laravel
phpjasper-laravel copied to clipboard
PDF can't show chinese
Hello~ When I use process() to export pdf,I can't show chinese in my pdf file. Is there exist any way to setting export language or i have to include chinese font name? Thanks u~
Hello @acer22969 Please check supported locales: http://www.oracle.com/technetwork/java/javase/java8locales-2095355.html and then configure this way:
$options = [
'format' => ['pdf'],
'locale' => 'zh-CN',
'params' => [],
'db_connection' => [
'driver' => 'postgres', //mysql, ....
'username' => 'DB_USERNAME',
'password' => 'DB_PASSWORD',
'host' => 'DB_HOST',
'database' => 'DB_DATABASE',
'port' => '5432'
]
];
Thank for you answer
But I will get a error like :
Undefined offset: 0
If I set 'locale' => '' to 'locale' => 'zh-TW'
I fix the last question
But I got new error like:
I fix the problem too. It's must be 'locale' => 'zh_TW' not 'locale' => 'zh-TW' But even I doesn't get any error,I still can't show chinese in my pdf file.QQ