Question

I all, I'm using R&OS to generate PDF. Everything is fine until I start doing Invoices because I need to print currency. I used all my knowledge but nothing fixed my problem.

code is here:

$pdf->ezText(utf8_encode(getDescription()),12,array('justification' => 'center')); 
$pdf->ezSetDy(-10);
$pdf->ezText(utf8_encode(getCurrency()), 12, array('justification' => 'center')); 
$pdf->ezSetDy(-10);

getDescription() return strings that contains characters like "é,à,ç" and getCurrency() returns value like "€, $, £" The PDF is fine with the description, I can see the specials characters, but the currency is always wrong.

For info, utf8_decode prints "?" utf_encode prints "â,-" (something like that for the last character)

I'm looking for some help, thanks in advance.

Was it helpful?

Solution

First I highly recommend you to use the latest version. With this version you can build an unicode document (if necessary), but this requires unicode fonts (*.ufm)

For ansi output I have amended the font example with the euro glyph, so please have a look at: this example built using this php code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top