Welcome Guest, Not a member yet? Register   Sign In
dompdf
#4

[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.



Messages In This Thread
dompdf - by El Forum - 09-03-2012, 08:47 AM
dompdf - by El Forum - 09-03-2012, 10:45 AM
dompdf - by El Forum - 09-03-2012, 10:50 AM
dompdf - by El Forum - 09-06-2012, 01:01 PM
dompdf - by El Forum - 09-06-2012, 01:24 PM
dompdf - by El Forum - 09-06-2012, 01:28 PM
dompdf - by El Forum - 09-06-2012, 02:03 PM
dompdf - by El Forum - 09-06-2012, 02:19 PM
dompdf - by El Forum - 09-06-2012, 02:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB