Some state names not in English

  • Posts: 583
  • Thank you received: 22
  • Hikaserial Subscription Hikashop Multisite
6 years 11 months ago #266965

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 7.0

Hi Hikashop Team,

When I create a PDF invoice and I use a Chinese, Russian or Arabic country as customer than the Invoice gave strange characters for the state names like ?????/ or rectangles.

Are there no English Names for those states?



I know I have to look for the right font into the attached PDF invoice plugin. But there is no font which does have all the characters from all languages or can show them on the right way.

The only font which can do the most is kozgopomedium / -regulaer and hysmyeongjostdmedium.

But the character separation from the state names is very wide, see image.



Is there something we can do to reduce the letter spacing?
Maybe to add a class to the order / address_template.php
Like this:



And then add a CSS style to the invoice.php file like this?
.state {font:stsongstdlight;}

or
.state {letter-spacing:-5px;}

But none of them works.

Kind regards,
Lumiga


Kind regards,
Lumiga
Attachments:
Last edit: 6 years 11 months ago by Lumiga.

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
6 years 11 months ago #266968

Hi,

I can't say much:
- the states are all in the language of their country, not in English. That's because HikaShop is a software used everywhere in the world. When you sell your products with HikaShop only in your own country, you want your customers to see the states in the country's language. And we don't have access to a database of all the states in all the languages to automatically translate them. If you want them in English, you would have to change all the states.
- the font is normally not a problem as your browser is able to display all the languages properly. However, you're using the PDF invoice plugin, which is based on the HTML2PDF library to convert the invoice to PDF and the fonts available are quite restrictive. I don't know of a font they provide which supports all the characters properly.
- having a font which would support everything properly would take hundreds of megabits which would have to be loaded each time to generate the PDF and it would crash.
- if you want to try other UTF8 fonts (it's been years last time I looked around), you can generate your own fonts and set them in the folder plugins/hikashop/attachinvoice/attachinvoice/_tcpdf_5.0.002/fonts and then add them in the plugins/hikashop/attachinvoice/attachinvoice.xml settings file. Here is an example to generate your font files compatible with the plugin, from a standard ttf font file: stackoverflow.com/questions/5263588/how-...ustom-fonts-in-tcpdf

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

  • Posts: 583
  • Thank you received: 22
  • Hikaserial Subscription Hikashop Multisite
6 years 9 months ago #272810

Hi Nicolas,

Thanks for your extensive explanation.

We try will fill in the English names manually.
In that case we have no issue with the font.

Kind regards,
Lumiga


Kind regards,
Lumiga

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

Time to create page: 0.066 seconds
Powered by Kunena Forum