FPDF is a nice little library for php that allows you to create PDFs on the fly. It’s great for all sorts of document, amongs them invoices. Until you try to use say a pound (£) or euro (€) sign. Basically the library itself does not support utf-8, so the moment you need to insert anything extra into your document a conversion needs to be done.
Here is the background:
I have a Web page with a Form that saves data to a MySQL database. I
need to retrieve the data from the database and create a PDF document
with FPDF.
The Web Page, the database, and the browser are all set to UTF-8, so I
have to convert the data from the database to ISO-8859-1 in order to
have FPDF show it correctly. I am using iconv() to convert the data.
It works like a charm for the data acquired with text boxes, but it does
not parse the data acquired from textareas correctly.
For example:
I have an text input (<input type="text" />) and a textarea
(<textarea></textarea>).
I type the string "sometextàèìòùésomeothertext" on both the input fields
and save it into the database through POST.
If I retrieve the data and show it on a web page, it shows correctly. I
then create the PDF with FPDF parsing the data with the following

