Display utf-8 characters ir pdf invoice

  • Posts: 12
  • Thank you received: 0
10 years 11 months ago #134949

--http://parduotuve.joomlatvs.lt/joomla/
-- HikaShop Essential 2.2.2
-- Joomla! 2.5.14

Hello,

i get question mark (?) instead of letters ą, č, ę, ė, į, š, ų in pdf invoice files. IF there any way to change it?

The PDF Invoice should work with all characters, lithuanian, latvian, rusian and so on...

Regards,
Arminas

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 11 months ago #135088

Hi,

Can you check your "hikashop attachinvoice" plugin and see if you right have the lines (two times):

$html2pdf = new HTML2PDF('P', 'A4', 'en',true, 'UTF-8');
It forces the initialization of the PDF library with the unicode support.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
10 years 11 months ago #135120

there is no such row in html2pdf.class.php file.

I think that is the matter of font. I have changed it to freesans. Now Lithuanian characters are shown, but it doesn't display bold. The BOLD characters in this font are shown like normal ones.

Any suggestion how to deal with this?

Arminas

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 11 months ago #135124

Hi,

No, I said to check the "attachinvoice" plugin file, which is named "attachinvoice.php".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
10 years 11 months ago #135293

I have these lines in attachinvoice.php file:

//$html2pdf = new HTML2PDF('P', 'A4', 'en');
$html2pdf = new HTML2PDF('P', 'A4', 'en',true, 'UTF-8');
$font = $this->params->get('font');

when I'm using arial lithuanian characters are shown as "?"
When I'm using freesans lithuanian characters are ok, but it doesn't show bold.

Regards

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 11 months ago #135387

Yes, it's a problem of font. Not all the fonts supports non-ASCII characters. You need to change the font in the options of the plugin into one which supports your characters. If the font that you select doesn't support bolding, I can only recommend you to try another one.
Unfortunately, adding bolding support to a font is not in the range of possibilities for us.

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum