I'm using a loop to generate a PDF file. Each iteration of the loop should generate a PDF page.
The problem is that a blank page is always coming out at the end of the generated PDF. I know this page is leaving because I'm using the CSS property
page-break-after:always
If I take out always
, the page break is not correct. How can I resolve?
HTML
@foreach($provas as $p)
<div class="page-break">
<div class="row">
<div class="col-md-12">
<h3 class="text-center">DNA Prova</h3>
</div>
</div>
<Restante do conteúdo da página>
</div>
@endforeach
CSS
.page-break{
page-break-after: always;
}