East Asia Font in PDF template problem

Dear Will,

I have purchased one commercial version of SuiteCRM in Oct. Everything is fine except the Chinese font support in PDF template.

When I print quote, all the Chinese word becomes to small rectangular. Could you help me settle in problem in new released version.

Regards

Edmond

Hi Edmond,

Does this page on languages help you at all?

Thanks,

Will.

Hi Edmond,

Please also see this page on languages.

Thanks,

Will.

Dear Will,

I use Quote module, the Chinese characters no display normally when I Print as PDF.


I check the font in pdf file is DejaVuSansCondensed. How to fix it?Thanks.

Chris

I check the DejaVuSansCondensed.ttf is in modules\AOS_PDF_Templates\PDF_Lib\ttfonts.

Dear Will,

I find this code in modules\AOS_PDF_Templates\generatepdf.php file:

$pdf=new mPDF(ā€˜enā€™,ā€˜A4ā€™,ā€™ā€™,ā€˜DejaVuSansCondensedā€™,$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);

the mode is en. should I change en to zh?

and I find this in modules\AOS_PDF_Templates\PDF_Lib\config.php

$this->useAdobeCJK = false;

could I change it to:
$this->useAdobeCJK = True;

Thanks in advance.
Chris

Dear Will,

now I changed this file: modules\AOS_PDF_Templates\PDF_Lib\config.php

$this->useAdobeCJK = false;

I changed it to:

$this->useAdobeCJK = True;

then Quick Repair and Rebuild in Admin module, log out, login, now the pdf file display normally.
Any questions if I modified the file? and is it a Bug?

Thank you.
Chris

Hi, how you solve this problem? I have this problem as well, but I can not find the folder ā€œPDF_Libā€ and do not find this line

this links are not workingā€¦

I have the same issue. How to fix it?

1 Like

same questionļ¼can someone please help us hereļ¼Ÿthanksļ¼ļ¼

hiļ¼Œcan you find the modules\AOS_PDF_Templates\PDF_Lib\config.php folderļ¼Ÿi can not find itā€¦

Versionļ¼š SuiteCRM-7.13.3

Step 1ļ¼Œ
I update the font file to /vendor/tecnickcom/tcpdf/fonts .
below:
droidsansfallback.ctg.z
droidsansfallback.php
droidsansfallback.z

Step 2:
and edit file: /vendor/tecnickcom/tcpdf/tcpdf.php

in tcpdf.php
find below codeļ¼š
public function setFont($family, $style=ā€˜ā€™, $size=null, $fontfile=ā€˜ā€™, $subset=ā€˜defaultā€™, $out=true) {
//Select a font; size given in points
if ($size === null) {
$size = $this->FontSizePt;
}
after it add below:
$family = 'droidsansfallback ';

fix it