php - MPDF Fatal error: Call to a member function WriteHTML() on null -


i want export data pdf file try use mpdf. following step step of tutorial, getting error

fatal error: call member function writehtml() on null in c:\xampp\htdocs\laboratorium\application\controllers\beranda.php on line 506 

in controller

$this->load->library('m_pdf');     $this->load->model('mod');     $data['result'] = $this->mod->getreport();      $html = $this->load->view('report', $data);     $this->m_pdf->pdf->writehtml($html);      //download it.     $this->m_pdf->pdf->output($pdffilepath, "d");    

and sure $html not null. try load , working. why happen?

try

   $this->load->library('m_pdf');     $this->load->model('mod');     $data['result'] = $this->mod->getreport();      $html = $this->load->view('report', $data,true);     $this->m_pdf->pdf->writehtml($html);      //download it.     $this->m_pdf->pdf->output($pdffilepath, "d");    

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -