Discussion:
Eurosign (€) in Zend_Pdf
GJ Bogaerts
2008-08-13 21:02:30 UTC
Permalink
I'm trying to insert the euro-sign € (html-entity: €) in a textstring in
a pdf generated by Zend_Pdf.

The problem is that the sign won't show at all. I've tried:
$this->_page1->drawText('€ 5300', 500, 20, "UTF-8");
and also:
$this->_page1->drawText(utf8_encode('€ ') . '5300', 500, 20, "UTF-8");

Other extended ascii-characters, such as ñ or á, do show up normally using
the second method.
Just the euro-sign keeps giving me problems. I'm using standard fonts
(Arial, Courier etc) that are present on the server.

Thanks for any help!

GJ
--
View this message in context: http://www.nabble.com/Eurosign-%28%E2%82%AC%29-in-Zend_Pdf-tp18971188p18971188.html
Sent from the Zend MFS mailing list archive at Nabble.com.
Dario Zamuner
2008-08-13 23:18:06 UTC
Permalink
I resolved with
html_entity_decode("€", ENT_COMPAT, "UTF-8")
as suggested in a comment http://framework.zend.com/issues/browse/ZF-588
HERE

Regards
Dario
Post by GJ Bogaerts
I'm trying to insert the euro-sign € (html-entity: €) in a textstring
in a pdf generated by Zend_Pdf.
$this->_page1->drawText('€ 5300', 500, 20, "UTF-8");
$this->_page1->drawText(utf8_encode('€ ') . '5300', 500, 20, "UTF-8");
Other extended ascii-characters, such as ñ or á, do show up normally using
the second method.
Just the euro-sign keeps giving me problems. I'm using standard fonts
(Arial, Courier etc) that are present on the server.
Thanks for any help!
GJ
--
View this message in context: http://www.nabble.com/Eurosign-%28%E2%82%AC%29-in-Zend_Pdf-tp18971188p18973023.html
Sent from the Zend MFS mailing list archive at Nabble.com.
GJ Bogaerts
2008-08-14 08:08:50 UTC
Permalink
Allright, that works!

Thanks Dario.
Post by Dario Zamuner
I resolved with
html_entity_decode("€", ENT_COMPAT, "UTF-8")
as suggested in a comment http://framework.zend.com/issues/browse/ZF-588
HERE
Regards
Dario
--
View this message in context: http://www.nabble.com/Eurosign-%28%E2%82%AC%29-in-Zend_Pdf-tp18971188p18977417.html
Sent from the Zend MFS mailing list archive at Nabble.com.
Loading...