laravel-pdf
laravel-pdf copied to clipboard
How to add additional pages?
Hi there! How to generate PDF with 2-3 pages ? I'v tried to make 2 html in 1 view - but seems it's not right way. Pls help)
have you found any any solution for that problem ?
This has worked for me:
<style>
.page-break {
page-break-after: always;
}
</style>
{{-- Contents of first page --}}
<p class="page-break"></p>
{{-- Contents of second page --}}
<p class="page-break"></p>
{{-- Contents of third page ... --}}
Edit: The custom tag <pagebreak />
also works, and is far more customizable:
{{-- Contents of first page --}}
<pagebreak />
{{-- Contents of second page --}}
<pagebreak />
{{-- Contents of third page ... --}}