PdfHeaderFooterOptions Class
The headers and footers PdfDocument.AddHeaderFooter stamps on the pages: up to three texts at the top of each page and three at the bottom, on the left, in the center and on the right.
public sealed class PdfHeaderFooterOptionsRemarks
A text is a template whose tokens are replaced for each page: {page} (the number of the page, from PdfHeaderFooterOptions.StartPageNumber), {pages} (the number of pages, or PdfHeaderFooterOptions.PageCount), {label} (the page label, or the number of the page when the document has none), {date} (PdfHeaderFooterOptions.Date in PdfHeaderFooterOptions.DateFormat) and {bates} (the Bates number of the page, PdfHeaderFooterOptions.Bates). {{ and }} are braces.
The date is never the current date implicitly: the output of the library depends only on the document and the options.
Constructors
| Name | Description |
|---|---|
| PdfHeaderFooterOptions() |
PdfHeaderFooterOptions()
PdfHeaderFooterOptions.cspublic PdfHeaderFooterOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| Bates | Gets the Bates numbering {bates} gives, or null when the texts have no Bates number. |
| Color | Gets the color of the text. The default is black. |
| Date | Gets the date {date} gives, or null when the texts have no date. |
| DateFormat | Gets the format of {date}, with the invariant culture. The default is yyyy-MM-dd. |
| FirstPageIndex | Gets the index of the first page stamped. The default is 0. |
| Font | Gets the font, or null for Helvetica. The standard 14 fonts only show the characters of WinAnsiEncoding. |
| FontSize | Gets the font size, in points. The default is 10. |
| FooterCenter | Gets the text in the center of the footer, or null for none. |
| FooterLeft | Gets the text on the left of the footer, or null for none. |
| FooterRight | Gets the text on the right of the footer, or null for none. |
| HeaderCenter | Gets the text in the center of the header, or null for none. |
| HeaderLeft | Gets the text on the left of the header, or null for none. |
| HeaderRight | Gets the text on the right of the header, or null for none. |
| LastPageIndex | Gets the index of the last page stamped, or null (the default) for the last page of the document. |
| Margin | Gets the distance, in points, between the texts and the edges of the page as it is displayed. The default is 36 (half an inch). |
| PageCount | Gets the number of pages {pages} gives, or null (the default) for the number of pages of the document. |
| Placement | Gets where the texts are painted: over the content of the page (the default) or under it. |
| StartPageNumber | Gets the number of the first page, for {page}. The default is 1. |
Gets the Bates numbering {bates} gives, or null when the texts have no Bates number.
public PdfBatesNumbering? Bates { get; init; }Property value
Gets the date {date} gives, or null when the texts have no date.
public DateTimeOffset? Date { get; init; }Property value
DateFormat
PdfHeaderFooterOptions.csFirstPageIndex
PdfHeaderFooterOptions.csGets the index of the first page stamped. The default is 0.
public int FirstPageIndex { get; init; }FontSize
PdfHeaderFooterOptions.csGets the font size, in points. The default is 10.
public double FontSize { get; init; }HeaderCenter
PdfHeaderFooterOptions.csHeaderLeft
PdfHeaderFooterOptions.csHeaderRight
PdfHeaderFooterOptions.csLastPageIndex
PdfHeaderFooterOptions.csGets the distance, in points, between the texts and the edges of the page as it is displayed. The default is 36 (half an inch).
public double Margin { get; init; }PageCount
PdfHeaderFooterOptions.csPlacement
PdfHeaderFooterOptions.csGets where the texts are painted: over the content of the page (the default) or under it.
public PdfContentPlacement Placement { get; init; }