Audience
Developers and anyone in need of a tool to generate PDF files from UTF-8 encoded HTML
About mPDF
mPDF is a PHP library that generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF with a number of enhancements. It is slower than the original scripts e.g. HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles, etc., and has been much enhanced. mPDF as a whole is quite a dated software. Nowadays, better alternatives are available, albeit not written in PHP. Use mPDF if you cannot use a non-PHP approach to generate PDF files or if you want to leverage some of the benefits of mPDF over the browser approach, color handling, pre-print, barcodes support, headers and footers, page numbering, TOCs, etc. But beware that an HTML/CSS template tailored for mPDF might be necessary. If you are looking for state-of-the-art CSS support, mirroring existing HTML pages to PDF, use headless Chrome. mPDF will still be updated to enhance some internal capabilities and to support newer versions of PHP.