Open hurycz opened 3 weeks ago
I have the same issue, header and footer not shown on the page.
I found solutions (transparent background with margins) Documentation needs to be fixxed how to use header/footer.
return Pdf::view('pdf.invoice', ['invoice' => $invoice])
->withBrowsershot(function (Browsershot $browsershot) {
$browsershot->transparentBackground();
})
->margins(14,0,14,0)
->headerView('pdf.invoice.header')
->footerView('pdf.invoice.footer')
->format(Format::A4)
->name('invoice.pdf')
->save(storage_path("invoice.pdf"));
tengo el mismo problema pero no me funciona
What happened?
I can't see header and footer in my PDF.
Any idea? I can't find any solutions on internet...
How to reproduce the bug
My controller:
My pdf.invoice.blade.php
My pdf.invoice.footer.blade.php
pdf.invoice.header is almost same...
PDF rendered OK, but header and footer is (maybe) under main content. I don't know. When i select all text, i see footer and header text.
Package Version
1.5.2
PHP Version
8.3
Laravel Version
11.20
Which operating systems does with happen with?
Windows, Linux
Notes
No response