UT8 support in PDF orders

Hello,

I am trying to adapt DoliBarr for Latvian language (ISO-8859-4 or windows-1257) orders in PDF but it seems to be a problem.

I am not very familiar with character set issues, so I am looking for some advice here.

I tried to update conversion function (convToOutputCharset) to work with iso-8859-4 and plain text output works fine, but FPDF library fails to output characters correctly (it seems that custom fonts are necessary, but i didn’t manage to get them working). I also tried to replace FPDF with UFPDF and got only strange results.

So possibility to export pdf as utf8 OR specify exact charset (at least in pdf_einstein.modules.php:115) would be excellent!

Otherwise, great CRM system.

Rgs,
Andis

Read this

It should help you

Thanks,

I tried to install version 3.0 from CVS & activate TCPDF

unfortunately no luck - characters are still corrupted (actually from discussion you provided above it seems that he also didn’t manage to get Greek letters working)

Rgs,
Andis

Upd: and also layout was messed up with some lines going over text (it was mentioned somewhere that by changing PDF library there are still changes to be made for templates, so I understand that, at least).

But does anybody have experience with integrating UFPDF ? it has to work, somehow, i beleive.

I did manage to get full greek characters working. As I said the only problem (small) is the alignment in the document templates. You have 2 solutions:

  1. change to an appropriate font and make the translation strings short enough so they can fit
  2. make a new document template (following the instructions in the wiki), based on those provided by Dolibarr and make everything look fine

Oh, thanks.

I will check if I can get fonts working. Template shouldn’t be a problem.

Rgs, Andis

Huh, got it working. It takes much more time to generate pdf document now but I guess it is not as big deal. Thanks for help.

The DejaVuSans is the slowest
I use freemono. It’s fixed width and the template is easier to modify and maintain