Jump to content

Broken currency symbol in PDF invoice


Recommended Posts

Hello there!
I have this problem, when I make invoice it appears like this 'лв.' instead of this 'лв.' (Bulgarian Leva).
For the PDF encoding I use Verdana font, the whole text is OK, except the currency symbol.
I checked in the database is recorded properly, on the site is printed normaly.
There is some info about the currency symbols on that page http://www.xe.com/symbols.php.
I tried to use the UTF code for my currency (1083, 1074) by adding this string:

 str_replace('лв', chr(1083)


to this code:

return str_replace('¥', chr(165), str_replace('£', chr(163), str_replace('€', chr(128), $s)));


to become this:

return str_replace('лв', chr(1083), str_replace('¥', chr(165), str_replace('£', chr(163), str_replace('€', chr(128), $s))));


After the change I have this result in the currency field ';.'
Can anybody help?

35256_s7TM6ZY9qINN7L72P3g7_t

Link to comment
Share on other sites

Az si rewih problema kato v pdf.php namirawt se v classes direktoriata zamestih simbola za лв. s niwto"" a v prevoda do vsicko dopylnih lv.

static private function convertSign($s)
{
$s = str_replace('Aa', chr(165),str_replace('Aa',chr(163),str_replace('oAi', chr(128),str_replace('??', "",$s))));
return iconv("utf-8", "windows-1251", $s);

poneze pri men se pojaviha ?? zatova gi zamenam tjah.

Zelaja ti uspeh.
MM

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