php - large content not moving to next page in dompdf
Get the solution ↓↓↓Solution:
For me i modified a litter the code but in essence work well. dompdf generate a pdf with 2 pages
$dompdf = new \Dompdf\Dompdf();
$dompdf->load_html($html);
$dompdf->render();
$canvas = $dompdf->get_canvas();
$options = new \Dompdf\Options();
$fontMetrics = new Dompdf\FontMetrics($canvas,$options);
$font = $fontMetrics->getFont('Arial');
$canvas->page_text(510, 775, "{PAGE_NUM} av {PAGE_COUNT}",
$font, 10, array(0,0,0));
$dompdf->stream("sample.pdf");
One important thing is that your example is plain text and i think is more accurate using html (a full html page)
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: http failure during parsing for
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.