0

mpdf not working on server but an another server it work on perfectly. what can I do?

public function get_qty_print_dataa(){ 
    $val = array();
    $id = $this->uri->segment(3);
    $val['qty_data'] = $this->common->get_qta_data('invoice','id',$id);
    $this->load->view('admin/print_qty_vieww',$val);

    $html = $this->load->view('admin/print_qty_vieww',$val,true);
    $str = "invoicee_".$val['qty_data']['invoiceno'].".pdf";
    $f_name = str_replace(' ', '', $str);
    $pdfFilePath= "public/admin/pfd_files/".$f_name;
    $this->load->library('m_pdf'); //load mPDF library
    $this->m_pdf->pdf->WriteHTML($html); //generate the PDF from the given html
    $this->m_pdf->pdf->Output($pdfFilePath, "F");  // save to folder
    $this->m_pdf->pdf->Output($f_name, "D"); //download it.
    //echo json_encode($html);         
}
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
jancy
  • 11
  • 1
  • 3
  • Check folder permissions... – Praveen Kumar Feb 21 '17 at 11:39
  • 1
    Any sort of error message or just quietly failing? [You can turn on error messages and see what's up.](http://stackoverflow.com/a/26733065/3585500) – ourmandave Feb 21 '17 at 12:06
  • i don't get any error messages .That page is loading with a blank page – jancy Feb 22 '17 at 04:24
  • MPDF works slow, and depending on what you want to generate, it takes time to show you the result. Depending on your server specifications (RAM, CPU), The response time can be different and sometimes it won't give any result at all. – Morteza Rajabi Apr 30 '17 at 06:26

0 Answers0