Solution for ISO-8859-* encoding

Moderator
Da Lithuania
Membro dal mar 2016

Here is a solution for BALTIC (or any other) character encoding. 

  1. [url=http://www.fpdf.org/makefont/]http://www.fpdf.org/makefont/[/url] use this link to generate 2 files from .ttf font file and choose your encoding. I used arial font and 'ISO-8859-4' encoding.

  2. Upload these two generated files to ext/fpdf/font/ folder. 

  3. in classes/pdf.inc change line 9 and 14

$txt = mb_convert_encoding($txt, 'Windows-1252', language::$selected['charset']);
to this:
$txt = mb_convert_encoding($txt, 'ISO-8859-4', language::$selected['charset']);

  1. In modules/order/om_pdf_invoice.inc.php

add line:
$pdf->AddFont('ariel','','arial.php');
below:


      $pdf->SetMargins(10, 2, 10);
      $pdf->SetAutoPageBreak(true, 2);```
and change all lines similar
```$pdf->SetFont('Arial', 'B', 10);```
to use new font generated:
```$pdf->SetFont('ariel', '', 10);```
Thats it.
Tu
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.