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. In the point following you will learn about integration of mPDF with CodeIgniter.
- Now lets look at the integration of mPDF with CodeIgniter
- Download mPDF library folder using download link mentioned above.
- Load this library in to auto load if you want it to be available everywhere readily.
Now lets write a simple program using mpdf. The following PHP code will produce the most basic example with mPDF.
- Include the main file containing the mpdf class :
- Create an instance of the class:
$mpdf = new mPDF();