0

As I am new to CodeIgniter, I am trying to convert a view to PDF using mpdf, but I am getting following error :

Call to undefined function mb_internal_encoding()

And the code in my controller file is:

public function DownloadPDF()
{
   $this->load->library('M_pdf');
   $data =array('id'=>'1',
                'name'=>'test'
               );
   $html=$this->load->view('user/Invoice', $data, true); 
   $pdfFilePath ="mypdfName-".time()."-download.pdf";
   $pdf = $this->M_pdf->load();
   $pdf->WriteHTML($html,2);
   $pdf->Output($pdfFilePath, "D");
}

Please, can anyone help me to solve this error?

Thanks in advance!

Obsidian Age
  • 41,205
  • 10
  • 48
  • 71
user7596840
  • 137
  • 15

0 Answers0