2011-03-04 48 views
4

我正在使用Zend_Pdf class創建PDF documentZend_Pdf德語字體問題.....?

這裏的內容都在GERMAN language,所以當我把內容寫到pdf的時候它自動地converts那些characterssome special chars

我無法弄清楚問題....?

我嘗試了一些這樣的代碼

$str = html_entity_decode($str, ENT_COMPAT, "UTF-8"); 

但它不把它和showing the same result ..... !!!!!!

請提供一些代碼或鏈接,可以幫助我........

在此先感謝.....

回答

5

感謝Zsub,

我使用下面的代碼得到了解決方案:

$text = $this->_font->encodeString($text, 'UTF-8'); 
2

你可能使用類似

$page->drawText($text, $xpos, $ypos); 
寫入Zend_Pdf_Page

只需添加編碼:

$page->drawText($text, $xpos, $ypos, 'UTF-8');