-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Guidelines
- I understand that if I fail to adhere to contribution guidelines and/or fail to provide all required details, this issue may be closed without review.
Description of the bug
I'm generating a PDF where a background-color is applied to the <body>, a TOC is created using tocpagebreak, and a colored <div> is added to each page. On the last page, the background color of <div> is missing. The previous pages work fine.
mPDF version
8.2.8
PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)
PHP 8.3, Apache
Reproducible PHP+CSS+HTML snippet suffering by the error
$html = "
<!DOCTYPE html>
<html>
<body style='background-color: gray;'>
<tocpagebreak>
<tocentry content='Test1'>
<div style='background-color: red;'>Test1</div>
<pagebreak>
<tocentry content='Test2'>
<div style='background-color: red;'>Test2</div>
<pagebreak>
<tocentry content='Test3'>
<div style='background-color: red;'>Test3</div>
</body>
</html>";
$mpdf = new \Mpdf\Mpdf();
$mpdf->WriteHTML($html);
$mpdf->Output();
Metadata
Metadata
Assignees
Labels
No labels