I am using codeigniter and I have a long view that I need a pagination but it didn't work properly. I tried to apply this example: https://mpdf.github.io/paging/page-numbering.html but ended up with a blank page as page 1?
$pdfdata = $this->load->view('pdf/pdffile', $data, true);
$pdf2 = $this->m_pdf->load();
$pdfFilePath2 = uniqid(rand(), true);
$pdfFilePath_2 = "pdffile-".date('Ymdhis')."-".$pdfFilePath2.".pdf";
$pdf2->setHeader('{PAGENO}');
$mpdf->WriteHTML('<pagebreak resetpagenum="1" pagenumstyle="1" suppress="off" />');
$pdf2->WriteHTML($pdfdata);
$pdf2->Output("./uploads/".$pdfFilePath_2, "F");
I wanted the header have pagination like "1 of page N" but I dont get the example and always give me a plank page as page 1. any idea?