Text from some non-English language is empty in the invoice PDF

This troubleshooting guide will teach you how to solve the problem when some none-English text is correctly appearing in the invoice itself but is empty in the PDF.

Description of the problem

In our example of this article, we will use the Georgian language. We add some Georgian text in the invoice - invoice topic, description, and item.

georgian_text_invoice.png

So far, so good. But, when we export the invoice as PDF from the button, then all of a sudden all the Georgian text that we have just entered is gone, and instead of them, some strange symbols are shown.

empty_invoice_pdf.png

Please check another example. Text working in the invoice:

second_example_invoice_georgian_text.png

And then, when you click on the PDF, the text is completely gone and it appears only to be blank. No text at all.

second_pdf_invoice_showing.png

Solution of the problem

To solve the problem, you have to manually download the font for the needed language from the Internet. For example, in our case, we have to just google "ttf with Georgian encoding". And just downloaded some Georgian font, for example from this site. As a result, you will have the Georgian font in your Downloads folder as a ttf file.

font_downloads.png

Then, please move the Georgian ttf to /plugins/redmine_contacts_invoices/lib/fonts. Then choose some of the existing fonts that you like, for example, "FreeSans.ttf" and remove it. Then rename the Georgian font to "FreeSans.ttf".

invoice_free_sans_replacement.png

And then, the PDF will start to show the Georgian language correctly as seen in the screenshot below.

Georgian_language_appearing_on_the_PDF.png

Was this article helpful? Yes  No
450 from 484 found this helpful