[eluser]claudia_ef[/eluser]
Hi! I was trying several times configure dompdf as a helper en CI 2.0. But it does not work out.
Path where I have dompdf: /application/helpers/dompdf
Dompdf helper: /application/helpers/to_dompdf_helper.php
/******************************/
<?php
if(!defined('BASEPATH')) exit('No direct script access allowed');
function to_dompdf($html){
require_once("dompdf/dompdf_config.inc.php");
$dompdf=new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper('letter', 'landscape');
$dompdf->render();
$dompdf->stream("hello_world.pdf");
}
/******************************/
?>
This function is executing in a test view.
I've added dompdf helper in the helper array in /application/config/autoload.php
I realized when I created the object, this didn't show its methods. Always shows this error:
Fatal error: Call to undefined method Dompdf::load_html() in /var/www/dashdev2.serverxyz.com/application/helpers/to_dompdf_helper.php on line 8
I don't know If I'm doing something wrong.
Please, need your help. Thanks.