Background color missing on last page when using tocpagebreak
Mantenedores costumam responder em até 5 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 22/100
Direção de pesquisa
The payload names no source files, so start by running the snippet with Mpdf\Mpdf and checking the last page's background. Then remove tocpagebreak and the TOC entries to see whether a plain pagebreak reproduces it. Done means the red div background renders on every page, including the last one, with a regression test added to the suite.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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();
- Linguagem predominante
- PHP
- Estrelas
- 4.7k
- Forks
- 1.1k
- Merge médio
- 6d 11h
- PRs com merge (30d)
- 4
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de mpdf/mpdf
-
SVG path arcs with an explicit zero radius throw DivisionByZeroErrorTalvez já em andamento @Syed-Shehroz-Sohail assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 5 dias
-
Closing a column set with an image in it leaves the cursor below the page, wasting the rest of itAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 5 dias
-
8.3: Local fallback for external stylesheets is inverted in CssLoader (basepathIsLocal check negated) — CSS silently dropped when remote fetch failsTalvez já em andamento @hemreduru assumiu há 12 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 5 dias
-
Tag/Td.php silently clears cell top/bottom borders when a row has a partial border (plus two warnings and a deprecation)Talvez já em andamento @alizamani1616 assumiu há 61 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 5 dias
-
AdjustHTML() collapses multiple spaces inside quoted attribute values (src, href)Talvez já em andamento @sornapudisuresh assumiu há 130 dias. Abertabug/fix help wanted HTML/CSS support
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
mpdf/mpdf#2208 · 1 comentário ·
Mantenedores costumam responder em até 5 dias
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
sync-en
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 2 dias
-
Перевод устарел
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
follow-up
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia