Generate PDF's in CodeIgniter using this easy to use library based on domPDF
- Codeigniter 3.x.x
- PHP version 5.3.0 or higher
- Just copy files in libraries folder into your libraries directory.
//load library
$this->load->library('pdf'); // change to pdf_ssl for ssl
$filename = "Document_name";
$html = $this->load->view('your_view_template');
$this->pdf->create($html, $filename);
You can also pass in data to the function just as you would using
$html = $this->load->view('your_view_template', $data, TRUE);
For more information on how to use domPDF then please visit: https://github.com/dompdf/dompdf/wiki/Usage
- CodeIgniter PDF Library - MIT License
- domPDF - GNU Lesser GPL