Automatic page header component for PDF documents.
Registers a header template that renders on every page using
Pdf.on_page(:header, ...). Combine with Pdf.Component.Paginator
for full header + footer support.
Examples
doc
|> Pdf.Component.PageHeader.apply(%{
title: "Monthly Report",
subtitle: "Generated by ExPDF",
color: {0.1, 0.1, 0.1}
})
doc
|> Pdf.Component.PageHeader.apply(%{
left: "Acme Corp",
right: :date,
line: true,
line_color: {0.2, 0.5, 0.8}
})
Summary
Functions
Apply an automatic header to the document.
Functions
Apply an automatic header to the document.
This registers a header template — all subsequent pages will have the header rendered automatically.
Style options
:title— centered title text:left— left-aligned text (overrides centered title):right— right-aligned text, or:datefor auto date, or:pagefor page number:subtitle— smaller text below title (only with:title):font— font name (default"Helvetica"):font_size— text size (default9):color— text color (default dark gray):margin_top— distance from page top (default30):line— draw a horizontal line below header (defaulttrue):line_color— line color (default light gray):line_width— line stroke width (default0.75):skip_first— skip header on first page (defaultfalse)