Question
Chinese characters saved in DB does not show in correct format while generating PDF.
We have some data in Euroopian/Chinese/Arabic characters in DB.
When we use the same data to get exported in PDF,it shows in some different format.The same is with export to excel functionality as well.However export to excel we have to modify pega OOTB activity pxConvertResultsToCSV to render correct encoding format.
SR-B65979 has been raised for the same.
For eg.腾讯控股有限公司 is shown as 腾讯控股æoe‰é™•公啸 when exported to PDF.
***Edited by Moderator Marissa to update SR Details***
Hello Sandeep,
TTF(True type font) files on the server will be used while generating the pdf. If the correct font file does not found then you will see this issue. In general pd4ml will not have all character sets in its jar file, so here we need to make use of the fonts from the Operating System.HTMLToPDF activity is being used to generate the PDF file, we have to make sure we pass the fonts directory to pyPDFFontsDirectory parameter while calling HTMLToPDF activity.
Please follow the below steps to set the fonts directory.
1. Make sure "pyPDFFontsDirectory" is set to point to a directory on the PRPC server where the fonts are located: On Windows using 'C:\WINDOWS\FONTS' generally works.
2. Pass pyEmbedFont parameter of HTMLtoPDF activity as true.
4. Make sure server has access to that fonts directory.
3. While exporting any LV or Report to PDF, make sure you to update the “pyPDFFontsDirectory” parameter in RULE-OBJ-DEFINITION PYPDFSETTING activity.
The visual representation of the above steps are explained in the following video.
https://pdn.pega.com/pegatube/support-guide-troubleshooting-cyrillic-script-not-appearing-generated-pdf
Hope this helps. Please feel free to reply your thoughts on this.
Thank you.