Displaying UTF characters in the FPDF

It is very easy to show UTF characters in a FPDF generated PDF file. Just use the following conversion function and it will work. Assume you have initialized the FPDF class to $pdf variable and you want to print the string stored in $name variable:

$pdf->Write(iconv(“UTF-8”, “ISO-8859-1”, $name));

It worked for me.

2 thoughts on “Displaying UTF characters in the FPDF

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.