如何使用代码点火器在dompdf中放置分页符

时间:2015-05-29 02:53:04

标签: php codeigniter dompdf

当我尝试运行它时,我的代码正在运行,它运行良好。它显示完整的记录。但是当我将它转换为dompdf时,它不会破坏并削减一些记录。我无法向您展示样本图片,因为我需要至少10个声誉。帮助我。

这是代码

//PRINT TO PDF 
$html = $this->output->get_output(); 
//Load Library 
$this->load->library('dompdf_gen'); 
//Convert to PDF 
$pdf = "Billing-" . $data['reference_number']; 
$this->dompdf->load_html($html); 
$this->dompdf->render(); 
$this->dompdf->stream($pdf . ".pdf", array('Attachment' => 0));

1 个答案:

答案 0 :(得分:0)

try this
//PRINT TO PDF 
$html = $this->output->get_output(); 
//Load Library 
$this->load->library('dompdf_gen'); 
//Convert to PDF 
$pdf = "Billing-" . $data['reference_number']; 
$this->dompdf->load_html($html); 
$this->dompdf->render(); 
$this->dompdf->stream($pdf . ".pdf", array('Attachment' => 0));exit;