Zend_Pdf font problems with german language.....?
I am using Zend_Pdf class
to create a PDF document
.
Here the contents are in the GERMAN language
, So when I write the content to the pdf it automatically converts
those characters
to some special chars
.
I am not able to figure out the problem....?
I tried some code like
$str = html_entity_decode($str, ENT_COMPAT, "UTF-8");
开发者_StackOverflow中文版
But it is not taking it and showing the same result
.....!!!!!!
Please provide some code or links that helps me........
Thanks in advance.....
Thanks Zsub,
I got the solution using following code :
$text = $this->_font->encodeString($text, 'UTF-8');
You probably write to a Zend_Pdf_Page using something like
$page->drawText($text, $xpos, $ypos);
Just add the encoding:
$page->drawText($text, $xpos, $ypos, 'UTF-8');
精彩评论