Closed GGarnize closed 1 year ago
If you use the <htmlpagefooter />
tag, it is no longer necessary to use the SetHTMLFooter
method.
<style>
@page {
footer: page-footer;
}
</style>
<htmlpagefooter name="page-footer">
Your Footer Content
</htmlpagefooter>
<h1>Hello World!</h1>
I'm trying set custom footer just to last page, and when document have 2 or more pages, my code works, but when this have unique page, my SetHTMLFooter
not overwrite the tag <htmlpagefooter />
, the function just overwrite when have more pages, then the function change the footer of last page.
$footer = '<span>Página {PAGENO} de {nbpg}</span>'
$mpdf = PDF::chunkLoadView('<html-separator/>', 'pdf.bladepdf', $data);
$mpdf->getMpdf()->SetHTMLFooter($footer);
<style> @page { footer: page-footer; } </style>
``
When Pdf generate 2 or more pages, It works, but when it have just one page,
SetHTMLFooter
Not cover the footer in blade