HTML to PDF Header and Footer Examples: Page Numbers, Logos, Dates

Adding a header or footer to an HTML to PDF request seems like it should be easy. You enable the option, generate a PDF, and then nothing shows up. Or the page number works, but the footer overlaps the document. Or the logo disappears because the header uses an external <img src="...">. Or you reuse CSS classes from the main page, but the header and footer cannot see those styles.
This guide gives you working HTML to PDF header and footer examples for the cases developers ask about most often: page numbers, document titles, logos, dates, invoice footers, legal headers, margins, and Base64 templates. The examples use PDFBolt's Chromium-based API, so they also feel familiar if you have used Puppeteer or Playwright.










