mPDF

June 9th, 2008

Updated  27th January 2010

mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on FPDF, HTML2FPDF, and UFPDF, with a number of enhancements.

I wrote mPDF to output PDF files 'on-the-fly' from my website, handling different languages. It is slower than the original scripts e.g. HTML2FPDF and produces larger files when using Unicode fonts, but support for CSS styles etc. has been much enhanced - see the features.

Version 4.2 is now released (27/01/10)

This PDF file demonstrates some of the latest features of version 4.2  (See other examples for version 4.1.1 and version 3).

Please see the examples, and feel free to download it. There is quite an extensive online documentation manual for mPDF. You may also find it helpful to visit the sites of FPDF and HTML2FPDF.

There is a Forum for any comments and discussion.

Please note:

  • I would be pleased to have (constructive) feedback, but I cannot guarantee a response. If you post a comment I will reply if I have the time, and perhaps others will reply.
  • Please do not post a message telling me the PHP code is messy! I am not a computer programmer (I have a proper day job).

If you like mPDF, please rate it at www.hotscripts.com