Generate PDF’s in CodeIgniter using this easy to use library based on domPDF.


  1. Drop the pdf.php library into your libraries directory.
  2. Download domPDF from
  3. Drop the dompdf directory into your libraries directory alongside the pdf.php file.


You can convert a view into a PDF by using the following code.


You can also pass in data to the function just as you would using $this->load->view('welcome', $data); by using

$this->pdf->load_view('welcome', $data);


For more information on how to use domPDF then please visit:


  • CodeIgniter PDF Library – MIT License
  • domPDF – GNU Lesser GPL


download from here


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s