views:

96

answers:

1

Hi I am exporting data from php page to pdf when the datas exceeed the page limit the header is not available for the consecutive pages function where i call the export to pdf is function changeDetails() { $bType = $this->input->post('textvalue');

                  if($bType == "pdf")
        {
            $this->load->library('table');
            $this->load->plugin('to_pdf');
            $data['countrytoword'] = $this->AddEditmodel1->export();
            $this->table->set_heading('Country','State','Town','Name');
            $out =  $this->table->generate($data['countrytoword']);
            $html = $this->load->view( 'newpdf',$data, true);
            pdf_create($html, $cur_date);
        }
    }

This is my view page from which i export data to pdf

Name Country State Town

Here I am getting the result as

page:1

Name country State Town
udaya india Tamilnadu kovai
chandru srilanka columbo aaaaa

page:2
vivek england gggkj gjgjkj

in the page 2 i dont get the headers name, country ,state and town

+3  A: 

It might help if you specifiy the PDF library you are using. I know that TCPDF supports spanning of tables across pages and it will repeat the table headers on every page, so you might check it out.

Check example 48 on the following page to see an example of table headers : http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_examples

wimvds