« Return to FAQ Database

Unicode/UTF8 characters in PDF invoice / embed font in PDF

If you are having trouble with multiple languages or special characters displaying within a PDF please try this:

Go to Settings > Advanced > change the 'pdf_library' value to:

pdfrocket

Then visit http://www.html2pdfrocket.com/Account/Register and sign up for an API key (choose PHP as language). You will receive an API key in  your email. This should allow you to generate about 100 PDFs a month. If you generate more you can continue to pay for the service.

Go to Settings > PDF  and enter your PDF Rocket API key into the settings box.

-----

Older options below:

if the setting is html2ps then:

  1. go to Settings > Advanced and look for 'pdf_embed_font'
  2. change the option from 'none' to 'all' and save.
  3. Download this 16MB TTF file: http://unifoundry.com/unifont-5.1.20080907.ttf
  4. Rename the uncompressed "unifont-5.1.20080907.ttf" file to "arialuni.ttf"
  5. Using FTP, upload this new "arialuni.ttf" file to your UCM folder: includes/plugin_pdf/html2ps/fonts/ (if asked to overwrite the existing arialuni.ttf file choose YES)
  6. generate a PDF to test.
if the setting is mPDF then:
  1. Download this 16MB TTF file: http://unifoundry.com/unifont-5.1.20080907.ttf
  2. Rename the uncompressed "unifont-5.1.20080907.ttf" file to "arialuni.ttf"
  3. Using FTP, upload this new "arialuni.ttf" file to your UCM folder: includes/plugin_pdf/mpdf/ttfonts/ (if asked to overwrite the existing arialuni.ttf file choose YES)
  4. generate a PDF to test.
 
If the unicode character still do not display then you may need to edit the invoice_print template and set the font family to arialuni like this:
 
<span style="font-family:arialuni;">Your Unicode Text Here</span>
 
or by modifying the template <style> tag and setting the body font family like this:
 
<style type="text/css">
body{
font-family: arialuni;
}
</style> 

Alternatively please try the mPDF instructions listed here: http://mpdf1.com/manual/index.php?tid=453





This FAQ Entry was created on: 2013-01-28 15:15:48
This FAQ Entry was last updated on: 2016-05-15 23:06:26