How can I convert excel to pdf?
I want to put 5 excel files and after I click upload convert them to 1 pdf.
My code:
/**
* Example: DOMPDF
*
* Documentation:
* http://code.google.com/p/dompdf/wiki/Usage
*
*/
public function index() {
// Load all views as normal
$this->load->view('test');
// Get output html
$html = $this->output->get_output();
// Load library
$this->load->library('dompdf_gen');
// Convert to PDF
$this->dompdf->load_html($html);
$this->dompdf->render();
$this->dompdf->stream("welcome.pdf");
}
The library:
class Dompdf_gen {
public function __construct() {
require_once APPPATH.'third_party/dompdf/dompdf_config.inc.php';
$pdf = new DOMPDF();
$CI =& get_instance();
$CI->dompdf = $pdf;
}
}