Articles on: Invoicing & Payments

Change font used on the PDF invoice

In some cases, the characters used in your customers information are not supported by the font selected to be used for the PDF invoices, so you will end with characters that looks like "?"

If you have this issue, or just want to try a different font, then follow these steps.

For Clientexec 5.0:

Open the file \modules\billing\models\PDFInvoice.php
The font dejavusans can allow to use some of the special characters. If you want to use it, then:

- go to line 80 and uncomment it //$this-\>pdf-\>SetFont('dejavusans', '', 10);
- go to line 82 and comment it $this-\>pdf-\>SetFont('helvetica', '', 10);

Another font that works (but not included on Clientexec) is freeserif. You will need to place the font files on:

- \library\CE\tcpdf\fonts\freeserif.php
- \library\CE\tcpdf\fonts\freeserif.ctg.z

Then, you will need to edit the file \modules\billing\models\PDFInvoice.php making sure to comment the lines 80 and 82 , and add a new line 83 with something like $this-\>pdf-\>SetFont('freeserif', '', 10);

If you want to use other fonts on the TCPDF class, you can download more from here:
http://sourceforge.net/projects/tcpdf/files/tcpdf\_fonts\_6\_0\_067.zip/download

Make sure to place the font files on \library\CE\tcpdf\fonts\

Updated on: 24/02/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!