0

I have a problem using FPDF while using special character like é, è or à.

I used $é = iconv('UTF-8', 'windows-1252', 'é'); and then I use it like this $pdf->Cell(0,0,'Donn'.$é.'es',0,1);. I know this is not the best way to work with but that's not a big deal...

The real problem is that we can not use variable in header or footer. Or I have to write a sentence in the footer with special character. How can I proceed to this ?

Atnaize
  • 1,766
  • 5
  • 25
  • 54
  • possible duplicate of [Special Characters in FPDF with PHP](http://stackoverflow.com/questions/3514076/special-characters-in-fpdf-with-php) – Armfoot Jul 02 '15 at 10:27

1 Answers1

0

I had to use a global variable.

In the main code

global $à ;
$à = iconv('UTF-8', 'windows-1252', 'à');

In the header/footer

$à  = $GLOBALS['à'];
Atnaize
  • 1,766
  • 5
  • 25
  • 54