PDF Template encoding

After Upgrading to 7.14.3 I have an issue with PDF Print. I use Serbian Latin characters for product names, client names and so on. When I print PDF all the data that is generated by PHP is displaying fine and all the characters are OK, but the text that I manually type in footer and header part of the PDF template is not shoving correctly. For example character “č” will show as character “?”. Even more strangely the manual text in body part of template is also rendering normally. In the version 7.13.x I didn’t have that problem. Any ideas?

SuiteCRM 7.14.3
CentOS Linux 7.9.2009
PHP 8.2.16

Thank you!

There have been changes to the PDF engine in that version (stop using mPDF, use TCPDF), so no wonder there are differences.

I wonder if your problem is the same as this one here

Yes, I do use TCPDF, and the problem is not the same, as in this GitHub issue.
I still use English Language pack for the interface.
I also use only standard fonts, like Arial.

And I also did try to change generatePdf.php by inserting this code but it didn’t work.

$str = mb_convert_encoding($header, 'ISO-8859-2');

I’m sorry, I don’t know what could be the problem… :man_shrugging:

it’s likely a problem with the font being used in the header and footer, not sure why this would have changed between 7.13 and 7.14 but it’s likely we just need to have the default font set directly on the header/footer

If you update the configurePDF function in lib/PDF/TCPDF/TCPDFEngine.php to include


it may fix your issue

Thank you Matt for suggestion. Unfortunately didn’t work. It is so strange that body is rendered correctly and just header and footer are with wrong encoding?!