Create PDF using PHP – mPDF

Hi All,

I have worked on few projects in ASP.Net, PHP & Coldfusion that require generating PDF on the runtime for invoices, receipts or letters. Coldfusion has its own in-built library for generating PDF’s but for ASP.Net & PHP we need to use third party libraries. I have used ABCPdf with Asp.Net & FPdf with PHP websites, and they both are good.

Recently I was working on a project that required to generate receipt & invoices in PDF, the catch was that I had to use Images, Custom Fonts & Background Images in the PDF output. Many PDF generator allow you to use images or background image in the PDF output but embedding custom font is tricky.

mPDF is a great solution for this, it allows you to use your custom fonts in the PDF with ease. mPDF is simple & easy to use and generates fast output.

Checkout this sample pdf that i generated using mPDF

Cheers,

Ankit

Leave a Reply

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