我一直在流动这篇文章以生成 pdf,但输出为空白并且没有显示错误,我放了:
public function generate_pdf()
{
$this->load->library('mpdf');
$mpdf=new mPDF('utf-8','A4');
$mpdf->WriteHTML('<p>HTML content goes here...</p>');
$mpdf->Output();
}
当我输入:
public function generate_pdf()
{
$this->load->library('mpdf');
$mpdf=new mPDF('utf-8','A4');
$mpdf->debug = true;
$mpdf->WriteHTML('<p>HTML content goes here...</p>');
$mpdf->Output();
}
提到这个答案,我得到这个错误:
Output has already been sent from the script - PDF file generation aborted.