Add HTML Headers & Footers

Configure the rendering options to include an HTML header and footer when rendering a PDF document.

Define the header content with a divider line, HTML fragment, and specify the maximum height of the header. Similarly, define the footer with the htmlHeader property.

Note that the height of the header and footer is not automatically detected, which means they might overlap with the main HTML content. Customize the margins to ensure the header and footer are appropriately positioned.