Monday 22 August 2016

Generating a PDF in Codeigniter using mPDF

Hey, today i will show you integrating mPDF into CodeIgniter Application. mPDF is a PHP Class, by using this we can easily generate PDF files from HTML Templates.So styling PDF files as easy styling your HTML template as you wish.
Following are the the simple steps to use mPDF with CodeIgniter.

Download and extract mPDF

Download mPDF from : http://www.mpdf1.com/mpdf/index.php and Extract it to your application/third_party/ folder of your CodeIgniter.
Create a new file in your application/libraries/ name it M_pdf.php and copy past the blow PHP Script.
That is it. You had successfully integrated mPDF in CodeIgniter. Now let’s use it.

How to Use

Load the mPDF library just like your load other CI’s other libraries and then call pdf property. See the blow example code for better understanding.
That’s it.
- See more at: https://arjunphp.com/generating-a-pdf-in-codeigniter-using-mpdf/#sthash.2E1iIviD.dpuf

No comments:

Post a Comment

Installation of Drop Box API on Codigniter

As with the YouTube API the first step in getting this sucker setup is getting a developer key by visiting  https://www.dropbox.com/develop...