News:

Support the VirtueMart project and become a member

Main Menu

Solved by myself - Languages problem (thai) with invoice/delivery PDF

Started by mcmannehan2002, November 21, 2016, 08:58:08 AM

Previous topic - Next topic

mcmannehan2002

Hello together, i am new here. Hope someone can help, because i didn't found an answer for my problem:

I did change the font for PDF in the admin to Free Mono (UTF-8 Unicode), but my invoice and my delivery PDF
dosen't show the Thai letters. I only get a lot question marks.

I did search in the forum and found this:
https://forum.virtuemart.net/index.php?topic=99783.0
http://forum.virtuemart.net/index.php?topic=99347.0
but this is not the right stuff for Virtuemart 3.0

Any sugesstions, what to do?





Studio 42

#1
Try to find a compatible PDF font
Here a link to convert any fonts http://www.xml-convert.com/en/convert-tff-font-to-afm-pfa-fpdf-tcpdf.
But sometime the font break

Studio 42

Have you copy the font in the librairies/tcpdf/font folder ?

Studio 42

Check this http://forum.virtuemart.net/index.php?topic=99347.0
Else try to change in \components\com_virtuemart\helpers\vmpdf.php
$this->setFontSubsetting(true);
to
$this->setFontSubsetting(false);

Another problem can be that the fonts are set in the HTML, so you need to add a jexit(); on the right view and check the used fonts, perhaps in the HTML another valid font is used. So your font is perhaps not used.

Milbo

Quote from: mcmannehan on November 22, 2016, 10:45:11 AM
Copy all the files (thsarabunnew.ctg.z, thsarabunnew.php, thsarabunnew.z) to /libraries/tcpdf/fonts

than change in components/com_virtuemart/helpers/vmpdf.php
at line 142 to
//$vmFont=$this->vendor->vendor_letter_font;
$vmFont='thsarabunnew';
May be there is another possibility to change the font, without a core hack, but this works fine.

Yes, just use the DROPDOWN ! There is no need to hack the core.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

You must also add the spec file, then you can use it in the list. But it can happen, that it does not work, when your server does not provide the function "glob"
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

Hi,
I like the "solved by myself', next time i explain you nothing. The vonverter is working in my case, perhaps not for thai and i gave you the file to search for else you perhaps not solved it.
Thanks anyway to send another one, this can help in other cases.