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

[eluser]soyut[/eluser]
Hi,

I have created a page for reporting. And, it is getting a dynamic data based on whatever queries selected.
Example;
Users can get a report between two different dates based on their 'income/expense' selection and 'type' selections.

After a submit report is created in another page: report_view2.php

at the bottom of report_view2.php i have created a link so that, when they click it they can get it in pdf format.

I am using mpdf library to do that. But somehow it is giving only blank pdf page.

I can create static pdf
Code:
$mpdf->WriteHTML('<p>Hello Tudip Technologies</p>');

but, doing something wrong with this dynamic content.


here is my controller function for the dynamic content.

Code:
public function topdf()
         {
          
           if ($this->input->post('submit'))
          {
            if($this->input->post('date1')){
                if($this->input->post('date2')){
          $data['reports'] = $this->blog_model2->reporting();
          $reports =array();    
    }}}
        $html = $this->load->view('report_view2', $data);
      
        $mpdf=new mPDF();
        
    $mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
    
    $mpdf->WriteHTML($html,2);
    
        $mpdf->Output('mpdf.pdf','I');
        
          }
Can anyone advise me about in this issue.

Thanks.


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