> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doczilla.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom header and footer for PDFs

> Enhance PDFs with custom headers and footers effortlessly.

Customize your PDFs
by incorporating headers and footers using the `headerTemplate` and `footerTemplate` options available for PDFs.
See [PDF options](/api-reference/pdf-options) for all available options.

## Example

<Tip>
  It is recommended to specify a font and color for your header/footer, the default is white and small.
</Tip>

<Note>
  We are adding a margin to prevent the header from overlapping the PDFs content.
</Note>

<CodeGroup>
  <Snippet file="code-group/pdf-with-custom-header-and-footer.md" />
</CodeGroup>

## Output

<Frame>
  <iframe height={500} width={'100%'} src="https://assets.doczilla.app/examples/pdf-with-custom-header-and-footer.pdf" />
</Frame>
