我将数据从php页面导出到pdf
当数据超出页面限制时,标题不可用于连续页面
函数,我称之为导出到pdf是
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);
}
}
这是我的视图页面,我将数据导出到pdf
名称
国家
州
镇
我在这里得到结果
page:1
Name country State Town
udaya india Tamilnadu kovai
chandru srilanka columbo aaaaa
page:2
vivek england gggkj gjgjkj
在第2页我没有得到标题名称,国家,州和城镇
解决方法:
如果您指定正在使用的PDF库,它可能会有所帮助.我知道TCPDF支持跨页面跨越表格,它会在每个页面上重复表格标题,因此您可以查看它.
标签:php,pdf,header,pdf-generation
来源: https://codeday.me/bug/20190621/1258795.html