PHP create PDF invoice

Martin picture Martin · May 6, 2011 · Viewed 78.2k times · Source

Hi does anyone know how I can create a nicely formatted PDF invoice through PHP?

Ideally I'm looking for something with a header and then an itemised listing of the products with some sort of table around. After a quick Google I would be comfortable with generating a PDF but to try and style it nicely would be another thing altogether.

Thanks

Answer

Timothy Strimple picture Timothy Strimple · May 6, 2011

I would recommend creating an html / css representation of what you want a PDF of and using that to generate the PDF. There are dozens of applications to handle the conversion, and there is a good thread with a lot of answers here: Convert HTML + CSS to PDF with PHP?