Hi @ismania,
Thank you for sharing the screenshot.
I tried to replicate this issue in Chinese language with the Loco Translate plugin and I am able to replicate the same at our end. The garbled text is displayed in the PDF file attached to the order email. I have already escalated this issue to the development team.
The developer has investigated this issue at our end. We have identified that the problem arises from the DOMPDF library, which currently does not support the Chinese language. While there are potential methods to add support for Chinese characters in the PDF generation, please note that this process requires some additional time and effort. We want to ensure we implement a robust solution that meets your needs. We will work on this and we will let you know as soon as there is progress on this issue. I hope you understand.
Do let us know if you have any questions, we are here to help.
Hi @ismania,
Our developer has fixed the issue you reported where the garbled text was appearing in the PDF attached to the email.
The patch for this issue is present in multiple files of our plugin.
Below is the link to download the patched files of our plugin that contains the patch for this issue.
Patch- https://www.dropbox.com/scl/fi/zqo7tignryolpc93x83uf/template.php?rlkey=hk1e5ksr6olbktiz9e6wstnpr&st=4yt7vvg9&dl=0
path- \plugins\woocommerce-delivery-notes\templates\pdf\default\invoice
patch- https://www.dropbox.com/scl/fi/n9547dpsq6296zjuwujur/style.css?rlkey=jn3n5uve25kwvakyykdcvrptq&st=5v09o32l&dl=0
path- \plugins\woocommerce-delivery-notes\templates\pdf\default
Patch- https://www.dropbox.com/scl/fi/4jcuds1v45tunenf9yazw/wcdn-front-function.php?rlkey=y4t4b45giqlbj0q1w6dgls4sd&st=imbwj2zp&dl=0
Font – https://www.dropbox.com/scl/fo/pkv0spdfh77hhu35pa4hr/AL_vK1X4jeAA2YOzhDmjkZc?rlkey=y63pxr3bwdwu7kdg6uqfu1fsz&st=oagbbyxt&dl=0
path- \plugins\woocommerce-delivery-notes\includes\front
Kindly download and replace the provided files with the existing ones via FTP on the above-mentioned path. Then, check if you can see the Chinese text correctly in the PDF attached to the email.
Please check and let us know the results.
Thank you for the fix. I’d like to try it out, but where should I place the font file?
Is this the correct path?
“path- \plugins\woocommerce-delivery-notes\includes\front”
Additionally,
my environment is in Japanese, not Chinese, so should I replace the font files with Japanese ones (like Noto Sans Japanese) and update the relevant paths accordingly?
-
This reply was modified 1 year, 5 months ago by
ismania.
Hi @ismania,
Sorry for the delay in response to this. I missed replying to this one.
I have tested this fix with the Japanese language on our staging site. I observed the text I have translated appears correctly on the Invoice.
Screenshot for your reference: https://app.screencast.com/5zzGjouhEFJfG
You can unzip the “fonts” folder provided in the below link, it contains the two files.
https://www.dropbox.com/scl/fo/pkv0spdfh77hhu35pa4hr/AL_vK1X4jeAA2YOzhDmjkZc?rlkey=y63pxr3bwdwu7kdg6uqfu1fsz&st=oagbbyxt&dl=0
Once you have unzipped it, you can create a new folder with the name “fonts” under the “front” folder and then upload the two files “NotoSansTC-Bold” and “NotoSansSC-Regular” there in the fonts folder.
Path: /plugins/woocommerce-delivery-notes/includes/front/font/<HERE>
Once you have done this, please check and let us know if the provided fix is working fine for you.
Please let us know the results.