A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support, with a strong focus on WordPress integration. If you just want a standalone option (without WordPress) use the mpdf/mpdf packagist option.


mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF (see CREDITS), with a number of enhancements. mPDF was written by Ian Back and is released under the GNU GPL v2 licence.

This version of mPDF has been for use with Gravity PDF. Changes include:

  • WordPress filters added
  • WP_DEBUG support added
  • All depreciated errors are converted to notices
  • Reduce package size by removing some of the larger fonts, including the CJK font support.
  • Better configuration defaults
  • Additional Bug Fixes
  • Removal of some features, including: progress bar

We recommend you use the vanilla Mpdf package.