mPDF Manual

mPDF

mPDF is a PHP library which generates PDF files from UTF-8 encoded HTML.

It is based on FPDF and HTML2FPDF with a number of enhancements.

The original author, Ian Back, wrote mPDF to output PDF files ‘on-the-fly’ from his 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. and has been much enhanced – see the features.

Support

Consider supporting development of mPDF with a donation of any value.

Useful manual pages

Development

Troubleshooting

Please use https://stackoverflow.com/questions/tagged/mpdf for all your general questions or troubleshooting!

Contributions are welcome :-) For contributing with a bug report, feature request or pull request, please see the guideline at GitHub. Please provide a nice small example case or unit test. That will be really helpful for everybody. Thanks!

Acronyms

These are the most used acronyms throughout this manual.

  • CJK - Chinese-Japanese-Korean languages
  • HTML - Hypertext Markup Language (code used to display Internet pages)
  • IE - Internet Explorer (Microsoft)
  • LTR - Left-to-Right document, used for most langauges
  • PDF - Portable Document Format
  • PHP - PHP: Hypertext Preprocessor
  • RTL - Right-to-Left document, used for Hebrew and Arabic languages
  • ToC - Table of Contents
Fork me on GitHub