Table of Contents

Class Template

Namespace
EvoPdf
Assembly
evohtmltopdf.dll

Represents a template element which can be repeated in all PDF document pages. You can use variables like current PDF page number and the total number of PDF pages in a template.

[ClassInterface(ClassInterfaceType.AutoDual)]
public class Template : ElementsRenderer
Inheritance
Template
Inherited Members

Properties

Anchoring

Gets or sets the template anchoring inside the PDF page

public TemplateAnchoring Anchoring { get; set; }

Property Value

TemplateAnchoring

Bounds

Gets or sets the template bounds rectangle. Setting this property for a default template has no effect.

public RectangleF Bounds { get; set; }

Property Value

RectangleF

BringToFront

When true, this property makes the template to be rendered in front of the page main content. By default this property is true.

public bool BringToFront { get; set; }

Property Value

bool

Docking

Gets or sets the template docking inside the PDF page

public TemplateDocking Docking { get; set; }

Property Value

TemplateDocking

DrawOnEvenPages

Set this property to indicate whether the template is drawn or not on the even pages. By default this property is true.

public bool DrawOnEvenPages { get; set; }

Property Value

bool

DrawOnFirstPage

Set this property to indicate whether the template is drawn or not on the first page. By default this property is true.

public bool DrawOnFirstPage { get; set; }

Property Value

bool

DrawOnOddPages

Set this property to indicate whether the template is drawn or not on the odd pages. By default this property is true.

public bool DrawOnOddPages { get; set; }

Property Value

bool

Height

Gets or sets template height for a custom template. Setting this property for a default document template has no effect.

public float Height { get; set; }

Property Value

float

PageNumberingPageCountIncrement

Gets or sets an increment for the total number of pages displayed using &P; variable in a TextElement added to the template.

public int PageNumberingPageCountIncrement { get; set; }

Property Value

int

PageNumberingStartIndex

Gets or sets the start index for page numbering using the &p; variable in a TextElement added to the template.

public int PageNumberingStartIndex { get; set; }

Property Value

int

SendToBackground

When true, this property makes the template to be rendered in the back of the page main content. By default this property is false.

public bool SendToBackground { get; set; }

Property Value

bool

Width

Gets or sets template width for a custom template. Setting this property for a default document template has no effect.

public float Width { get; set; }

Property Value

float

Methods

AddElement(PageElement)

Adds a PDF page element to this template repeated in each PDF page

public override AddElementResult AddElement(PageElement pageElement)

Parameters

pageElement PageElement

The page element to be added

Returns

AddElementResult

The result of element rendering

Events

BeforeRenderInPdfPageEvent

The event is raised right before the template is rendered in a PDF page. The template rendering in PDF page can be canceled by setting the CancelRender property on false

public event BeforeRenderTemplateInPdfPageDelegate BeforeRenderInPdfPageEvent

Event Type

BeforeRenderTemplateInPdfPageDelegate