PdfPageOptions.FooterTemplate Property

Gets or sets the HTML template for page footer.

Namespace:  BitMiracle.Docotic.Pdf.HtmlToPdf
Assembly:  BitMiracle.Docotic.Pdf.HtmlToPdf (in BitMiracle.Docotic.Pdf.HtmlToPdf.dll)

Syntax

C#
public string FooterTemplate { get; set; }
VB
Public Property FooterTemplate As String
	Get
	Set

Property Value

Type: String
The HTML template for page footer.

Remarks

Default value: null.

The template should be valid HTML. The conversion engine won't wait for external resources to load. Therefore, it is recommended to use inline styles. Data URIs are recommended for images.

You might want to specify a bottom margin for the page using the MarginBottom property. Without the margin, the footer may be obscured by the page contents.

When creating PDF pages, the library will inject values into HTML entities with the following classes:

  • date (formatted creation date).
  • title (document title).
  • url (document location).
  • pageNumber (current page number)
  • totalPages (total pages in the document)

The library won't add header and footer if both this and HeaderTemplate property values are null or empty strings.

See Also