Header & Footer Layouts

Embed repeated header/footer templates across your PDF pages. Supports custom alignment, page number triggers, margins, and HTML template styling.

header_html code
Default: "<div style="font-size: 10px; text-align: center; width: 100%; padding: 10px; font-family: sans-serif; border-bottom: 1px solid #ddd;"> <strong>HtmlToDoc API</strong> • Automated Invoice System • Page <span class="pageNumber"></span> of <span class="totalPages"></span> </div>"

HTML template content for page headers.

header_text text
Default: ""

Standard raw text to print in the page header.

header_align select
Default: "left"

Alignment property of the header content.

Available options:
left center right
header_margin text
Default: "0px"

Margin at the top of the page for the header placement.