Welcome Guest, Not a member yet? Register   Sign In
mpdf with dynamic data
#14

[eluser]soyut[/eluser]
forgot to add the function, sorry

Code:
public function report(){
        
      if ($this->input->post('submit'))
          {
            if($this->input->post('date1')){
                if($this->input->post('date2')){
          $data['reports'] = $this->blog_model2->reporting();
          $reports =array();    
     //below the code i have copied from function topdf()
         $html = $this->load->view('report_view2', $data, TRUE);
    
        $mpdf=new mPDF();
            
        $mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
    
    
    
        $mpdf->WriteHTML($html,2);
    
        $mpdf->WriteHTML($this->output->get_output(),2);
        $mpdf->Output('mpdf.pdf','I');
    
        }else{
            
            
            echo "Please enter a valid end date!";
        }
            
       }
       else{
            echo "Please enter a valid start date!";
        }
        
        
        } //submit
        else {
        
        $this->load->view('header_view');
        $this->load->view('nav_view');
        $this->load->view('report_view');
        $this->load->view('footer_view');
        
        } //report_view
    } //report


Messages In This Thread
mpdf with dynamic data - by El Forum - 10-17-2012, 09:42 AM
mpdf with dynamic data - by El Forum - 10-19-2012, 12:26 PM
mpdf with dynamic data - by El Forum - 10-19-2012, 01:28 PM
mpdf with dynamic data - by El Forum - 10-19-2012, 01:34 PM
mpdf with dynamic data - by El Forum - 10-19-2012, 07:50 PM
mpdf with dynamic data - by El Forum - 10-19-2012, 10:03 PM
mpdf with dynamic data - by El Forum - 10-20-2012, 04:59 PM
mpdf with dynamic data - by El Forum - 10-21-2012, 09:11 PM
mpdf with dynamic data - by El Forum - 10-22-2012, 06:48 AM
mpdf with dynamic data - by El Forum - 10-22-2012, 10:20 AM
mpdf with dynamic data - by El Forum - 10-22-2012, 10:38 AM
mpdf with dynamic data - by El Forum - 10-22-2012, 10:55 AM
mpdf with dynamic data - by El Forum - 10-22-2012, 05:14 PM
mpdf with dynamic data - by El Forum - 10-22-2012, 05:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB