Posted inCodeigniter / php

dompdf codeigniter PDF Generation – How to Configure domPdf?

dompdf codeigniter – CodeIgniter customer Library for convert HTML to PDF – Create custom PDF library for generate PDF document in CodeIgniter using Dompdf.

dompdf codeigniter

I would like to present how to use domPdf library with codeigniter to generate PDF reports. and here step by step Convert HTML to PDF in CodeIgniter using Dompdf.

How to Convert HTML to PDF in CodeIgniter using Dompdf Library?

Step 1: Download Fresh Codeigniter 3

download from here : Download Codeigniter 3.

Step 2: Download dompdf library from GitHub

Load CodeIgniter Pdf library to use Dompdf class.


dompdf = $pdf;

Convert HTML content and generate PDF using Dompdf.

Step 3: Add Controller Method



   function getallmemberdata(){

        $html = $this->output->get_output();
        $this->pdf->setPaper('A4', 'landscape');
        $this->pdf->stream("welcome.pdf", array("Attachment"=>0));

Step-4: Add Route


Step 5: Add View File


	Codeigniter 3 - Generate PDF from view using dompdf library with example

Codeigniter 3 - Generate PDF from view using dompdf library with example -

Id Member Name Email
1 Mayur [email protected]
2 Krishna [email protected]

Now you can open bellow URL on your browser:


Don't Miss : create pdf in codeigniter using mpdf

I hope you get an idea about dompdf codeigniter.
I would like to have feedback on my
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype