Category: PHP

DomPDF is a PHP library for converting HTML to PDF file. One of the common issues developers have with this library is setting the header and footer of pages for the PDF file, and that is what this article is about.

To add a header to the body tag of the template file, put your header elements inside a header tag.

Just like the header, we will put our footer in a footer tag inside the body tag of the template. Just like header, we will create a space for our footer on every page then use part of the space for our footer.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners