发送邮件时如何在CODEIGNITER中将HTML文件转换为PDF?
$this->load->library('html2pdf');
$this->html2pdf->folder('./assets/pdfs/');
$this->html2pdf->filename('email_test.pdf');
$this->html2pdf->paper('a4', 'portrait');
$data = array(
'title' => 'PDF Created',
'message' => 'Hello World!'
);
//Load html view
$this->html2pdf->html($this->load->view('pdf', $data, true));
//Check that the PDF was created before we send it
$path = $this->html2pdf->create('save');
我使用此代码进行转换。