Jump to content

Can't use Lithuanian Capital letters in Invoice


Recommended Posts

Hi,

 

The problem in invoice is that in text I can't use these Capital Lithuanian letters (ĄČĘĖĮŲŪŽ). 

When in invoice is at least one of the following letters, the text does not generate and invoice looks like this:

post-977810-0-99147500-1427809370_thumb.png

 

In "classes\pdf\PDFGenerator.php": default font is set "dejavusans".

 

It would be great if you could advise how to solve the problem.

Edited by 1gnas (see edit history)
Link to comment
Share on other sites

What is your PrestaShop version? Have you tried another font - helvetica or freeserif?

 

Prestashop version: 1.6.0.9

Yes I tried these fonts. With Fresherif same situation, with Hevletica I get questionmarks "?" instead of letters.

Link to comment
Share on other sites

The default is dejavusans but lithuania is not present on the country table, hence the PDFGenerator.php (line 35) forces the font to be helvetica.

 

Change in classes/pdf/PDFGenerator.php the line:

const DEFAULT_FONT = 'helvetica';

with

const DEFAULT_FONT = 'dejavusans';

 

Be sure to regenerate your pdf once this line is changed

PS_PDF_USE_CACHE should be 0 (Order / Invoice - last widget)

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...