Client portal

Change font used on the PDF invoice

 June 20, 2014     0 Comments

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:

  1. Open the file \modules\billing\models\PDFInvoice.php
  2. 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\

How helpful was this article to you?

Posting has been disabled.