Continuing the discussion from [Solved] PDF Report Generation :
public function invoice_aging()
{
if ($this->input->post('btn_submit'))
{
$data = array(
'results' => $this->mdl_reports->invoice_aging()
);
$html = $this->load->view('reports/invoice_aging', $data, TRUE);
// we are not using the mpdf helper
// $this->load->helper('mpdf');
// pdf_create($html, lang('invoice_aging'), TRUE);
// but we need the mpdf library
require_once(APPPATH . 'helpers/mpdf/mpdf.php');
$mpdf = new mPDF('c', 'A4-L');
$mpdf->SetAutoFont();
$mpdf->WriteHTML($html);
$mpdf->Output($filename . '.pdf', 'I');
}
$this->layout->buffer('content', 'reports/invoice_aging_index')->render();
}
Hi Miquel,
I try it, but its not working for me.
I also try to modify the path to helper here : require_once(APPPATH . ‘helpers/mpdf_helper.php’);
But it not working
Please help me to understand how i can do it ?
Thx
naui95
October 9, 2022, 1:13pm
2
Hi, can you try to be a bit more specific? What are you trying to achieve? What page are you trying to set horizontal?
1 Like