# UT8 support in PDF orders

**URL:** <https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897>\
**Category:** Using my Dolibarr\
**Created:** [December 8, 2010, 10:51pm UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897 "2010-12-08T22:51:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![andis](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@andis](https://www.dolibarr.org/forum/u/andis)\
**Post date:** [December 8, 2010, 10:51pm UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897/1 "2010-12-08T22:51:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thomas](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/t/e36b37/32.png) [@thomas](https://www.dolibarr.org/forum/u/thomas)\
**Post date:** [December 8, 2010, 10:55pm UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897/2 "2010-12-08T22:55:29Z")

</div>

Read this

> **[Open Source ERP CRM software](http://www.dolibarr.org/#this-topic-no-longer-exists)**
>
> Dolibarr ERP CRM is an Open Source software package for small, medium or large companies, freelancers or foundations to manage business. It's a PHP project built by modules addition (invoice, proposal, contact, stock, order, hr, agenda...). Running...

It should help you

---

<div class="post-metadata">

**Author:** ![andis](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@andis](https://www.dolibarr.org/forum/u/andis)\
**Post date:** [December 8, 2010, 11:25pm UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897/3 "2010-12-08T23:25:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andis](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@andis](https://www.dolibarr.org/forum/u/andis)\
**Post date:** [December 8, 2010, 11:28pm UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897/4 "2010-12-08T23:28:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thomas](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/t/e36b37/32.png) [@thomas](https://www.dolibarr.org/forum/u/thomas)\
**Post date:** [December 9, 2010, 8:09am UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897/5 "2010-12-09T08:09:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andis](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@andis](https://www.dolibarr.org/forum/u/andis)\
**Post date:** [December 9, 2010, 8:13am UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897/6 "2010-12-09T08:13:12Z")

</div>

Oh, thanks.

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

Rgs, Andis

---

<div class="post-metadata">

**Author:** ![andis](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@andis](https://www.dolibarr.org/forum/u/andis)\
**Post date:** [December 9, 2010, 2:18pm UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897/7 "2010-12-09T14:18:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thomas](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/t/e36b37/32.png) [@thomas](https://www.dolibarr.org/forum/u/thomas)\
**Post date:** [December 9, 2010, 2:32pm UTC](https://www.dolibarr.org/forum/t/ut8-support-in-pdf-orders/6897/8 "2010-12-09T14:32:32Z")

</div>

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