public class TemplateFixedPosition extends TemplatePosition
This is simplest way to define the field position. It requires to set a rectangular area on the page that bounds the field value. All the text that is contained (even partially) into 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");
| Constructor and Description |
|---|
TemplateFixedPosition(Rectangle rectangle)
Initializes a new instance of the
TemplateFixedPosition class. |
| Modifier and Type | Method and Description |
|---|---|
Rectangle |
getRectangle()
Gets the rectangular area that contains the template field.
|
TemplatePosition |
scale(double factor)
Creates a copy of the current position with all coordinates scaled by the given factor.
|
public TemplateFixedPosition(Rectangle rectangle)
TemplateFixedPosition class.rectangle - The rectangular area that contains the template field.public Rectangle getRectangle()
Rectangle class that represents the rectangular area that contains the template field.public TemplatePosition scale(double factor)
TemplatePositionscale in class TemplatePositionfactor - The scaling factor.TemplatePosition with scaled coordinates.Copyright © 2026. All rights reserved.