barryvdh / laravel-snappy

Laravel Snappy PDF
MIT License
2.59k stars 289 forks source link

How to generate footer and header #490

Open ezitisitis opened 1 year ago

ezitisitis commented 1 year ago

Unfortunately, I didn't find how to add a header and footer to the PDF. Maybe that can be added to Readme?

dmarcos89 commented 1 year ago

Something like this should do it:

$pdf->setOption('footer-right', 'Page [page] of [toPage]');
ezitisitis commented 1 year ago

Sorry, I in some way absolutely missed the response 🤦🏻 Not able to recheck straight away, but as far as I remember it didn't work for me. Will get back to code and will recheck

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any issues with PDF rendering itself that are not directly related to this package, should be reported on https://github.com/KnpLabs/snappy instead. When having doubts, please try to reproduce the issue with just snappy. If you believe this is an actual issue with the latest version of laravel-snappy, please reply to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.