Jump to content

PDF generated not showing japanese characters correctly


Recommended Posts

Hi, can anybody tell me where to start looking to try to solve this issue.
In PDF document generated for invoices and the like, all kanji characters are displayed as "???" , but in the BO and FO forms pages they are shown correctly

thanks for any help

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...
  • 4 weeks later...
  • 6 months later...

SOLUTION FOUND (v.1.5.3)

 

It works if you have the localization pack. (can be downloaded any time through BO)

So in the case of Japanese, I did next:

 

/classes/pdf/PDFGenerator.php line35 const DEFAULT_FONT = 'helvetica';

replace 'helvetica' with 'cid0jp'

 

DONE. Your invoices now show Japanese properly.

  • Like 2
Link to comment
Share on other sites

  • 2 years later...

Great solution, running ok in prestashop 1.6.1

 

change in /classes/pdf/PDFGenerator.php

class PDFGeneratorCore extends TCPDF
{
   const DEFAULT_FONT = 'helvetica';

	public $header;
	public $footer;
	public $content;
...

for

class PDFGeneratorCore extends TCPDF
{
   const DEFAULT_FONT = 'cid0jp';

	public $header;
	public $footer;
	public $content;
...
Edited by moraira (see edit history)
Link to comment
Share on other sites

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...