TemplateFixedPosition class

TemplateFixedPosition class

Provides a template field position defined by a rectangular area.

This is the simplest way to define the field position. It requires setting a rectangular area on the page that bounds the field value. All the text that is contained (even partially) in the rectangular area will be extracted as a value:

// Create a fixed template field with "Address" name which is bounded by a rectangle at the position (35, 160) and with the size (110, 20)
TemplateField templateField = new TemplateField(
    new TemplateFixedPosition(new Rectangle(new Point(35, 160), new Size(110, 20))),
    "Address");

The TemplateFixedPosition type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the TemplateFixedPosition class.

Properties

Property Description
rectangle The rectangular area that contains the template field.

Example

from groupdocs.parser.templates import TemplateFixedPosition, TemplateField, Template
from groupdocs.parser.data import Rectangle, Point, Size

field = TemplateField(
    TemplateFixedPosition(Rectangle(Point(35.0, 135.0), Size(100.0, 10.0))),
    "CompanyName",
)

See Also