TemplateLinkedPosition

TemplateLinkedPosition class

Provides a template field position which uses the linked field.

public sealed class TemplateLinkedPosition : TemplatePosition

Constructors

Name Description
TemplateLinkedPosition(string, Size, TemplateLinkedPositionEdges) Initializes a new instance of the TemplateLinkedPosition class.
TemplateLinkedPosition(string, Size, TemplateLinkedPositionEdges, bool) Initializes a new instance of the TemplateLinkedPosition class with UPPER CASE linked field name.
TemplateLinkedPosition(string, Size, TemplateLinkedPositionEdges, bool, bool) Initializes a new instance of the TemplateLinkedPosition class.

Properties

Name Description
AutoScale { get; } Gets the value that indicates whether SearchArea is scaled by the linked field size.
Edges { get; } Gets the edges of the linked field where a field is searched.
LinkedFieldName { get; } Gets the linked field name.
SearchArea { get; } Gets the size of the area where a field is searched.

Examples

The following example shows the code for the situation if it’s known that the field with an invoice number is placed on the right of “Invoice number” string the following code is used:

// Create a regex template field to find "Invoice Number" text
TemplateField invoice = new TemplateField(new TemplateRegexPosition("Invoice Number"), "Invoice");

// Create a related template field associated with "Invoice" field and extract the value on the right of it
TemplateField invoiceNumber = new TemplateField(
    new TemplateLinkedPosition("invoice", new Size(100, 15), new TemplateLinkedPositionEdges(false, false, true, false)),
    "InvoiceNumber");

See Also