Question

I am exporting data table from php page to pdf I got the page exported to pdf but i can't insert the page number into the pdf file how to insert that function changeDetails() { $bType = $this->input->post('textvalue'); if($bType == "pdf") { $this->load->library('table'); $this->load->plugin('to_pdf'); $data['countrytoword'] = $this->AddEditmodel1->export(); //echo 'CountryList

'; $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); } } and this is my view page Name Country State Town Name Country State Town

</tr>

Was it helpful?

Solution

Why don't you use a library like TCPDF, it will add page numbers automatically (if you want them that is). Just look at the examples provided.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top