How to Generate and Download PDF in Codeigniter using mPDF ?

Hi User, Thanks for visiting this blog for your query. With the help of this article you will learn about how to generate PDF file in codeigniter with the help of mPDF Library.

How to Generate and Download PDF in Codeigniter using mPDF ?
 

Steps for configuring mPDF in codeigniter to generate and download pdf

1. 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.

2. Create a new file in your application/libraries/ name it M_pdf.php

3. Create a file in controller and paste the below code

I hope this will help out to resolve your query. If you found any issue please share it in the comment box.

One thought on “How to Generate and Download PDF in Codeigniter using mPDF ?”

  1. file will be store on server but not download in chrome browser when using D in place of F

Leave a Reply