Eurosign (€) in Zend_Pdf

3 messages Options
Embed this post
Permalink
GJ Bogaerts

Eurosign (€) in Zend_Pdf

Reply Threaded More More options
Print post
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
Dario Zamuner

Re: Eurosign (€) in Zend_Pdf

Reply Threaded More More options
Print post
Permalink
I resolved with
html_entity_decode("€", ENT_COMPAT, "UTF-8")
as suggested in a comment HERE

Regards
Dario

GJ Bogaerts wrote:
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
GJ Bogaerts

Re: Eurosign (€) in Zend_Pdf

Reply Threaded More More options
Print post
Permalink
Allright, that works!

Thanks Dario.


Dario Zamuner wrote:
I resolved with
html_entity_decode("€", ENT_COMPAT, "UTF-8")
as suggested in a comment HERE

Regards
Dario