这是我的控制器:
function dompdf(){
$this->load->view('contracts/equipment_pdf');
$html = $this->output->get_output();
$this->load->library('dompdf_gen');
$this->dompdf->load_html($html);
$this->dompdf->render();
$this->dompdf->stream("test.pdf", array("Attachment" => 0));
}
问:我如何在那里添加数据?像 $data['name'] = "name";
Q2:如何将数据放入我的 pdf 生成器?我怎么称呼它