TemplateLinkedPosition class

TemplateLinkedPosition class

Provides a template field position which uses the linked field.

The TemplateLinkedPosition type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the TemplateLinkedPosition class.
init Initializes a new instance of TemplateLinkedPosition with an upper‑case linked field name.
init Initializes a new TemplateLinkedPosition instance.

Properties

Property Description
auto_scale The value indicating whether the linked position’s search area is scaled by the linked field size.
edges The edges of the linked field where a field is searched.
linked_field_name The linked field name as an uppercase string.
search_area The size of the area where a field is searched.

Example

from groupdocs.parser.data import Size
from groupdocs.parser.templates import (TemplateField, TemplateLinkedPosition,
                                        TemplateLinkedPositionEdges, TemplateRegexPosition)

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

# Create a related template field associated with "Invoice" field and extract the value on the right of it
invoice_number = TemplateField(
    TemplateLinkedPosition("invoice", Size(100, 15), TemplateLinkedPositionEdges(False, False, True, False)),
    "InvoiceNumber")

See Also