Text field

Attributes

bbox.xrequired
X coordinate of the lower left corner of the bounding box of the field. Needs to be greater than or equal to 0.
bbox.yrequired
Y coordinate of the lower left corner of the bounding box of the field. Needs to be greater than or equal to 0.
bbox.widthrequired
Width of the bounding box of the field. Needs to be greater or equal to 1.
bbox.heightrequired
Height of the bounding box of the field. Needs to be greater or equal to 1.

The units of the bounding box are points. They are mainly driven by the page size and resolution of the underlying PDF document. For example an A4 page with width of 210 mm and height of 297 mm and a default resolution of 72 DPI results in a page width of 595.27 and height of 841.88 pts. The root coordinate (0, 0) is the lower left corner of the page.


namerequired
Key name of the field. This is going to be the key for populating the value when filling the template. This key name can be used multiple times, every occurrence of the key will be filled with the same value. Caution: do not mix field types.
pagerequired
The index of the page the field is residing on, starting with 0. Upper limit is the number of pages in the template
requiredoptional
Is the key required in the payload when filling the PDF. Default is true.
typerequired
Identifier of the type of the field. Always set to text.
font_sizeoptional
Specify the font size to be filled with. Defaults to 9
coloroptional
Specify the font color to be used. Format is either common color cod names (e.g. black, red, etc.) or hex color codes. Defaults to `black`.
h_alignoptional
Horizontal alignment of the to be filled text. Possible values are `L` for left aligned, `C` for centering and `R` for right aligned text. Defaults to `L`.
v_alignoptional
Vertical alignment of the to be filled text. Possible values are `T` for top aligned, `C` for centering and `B` for bottom aligned text. Defaults to `B`.
font
Defined the font to be used: Currently supported are: `courier`, `helvetica` and `times_roman`. Defaults to `helvetica`.
cells
Boolean field indicating whether to activate cells. Defaults to `false`
cell_count
Optional field to specify the number of cells within the field. Each cell is filled with a single character. Cells are equally spaced across the width of the field. Must be 1 or greater if cells are enabled.
cell_offset
Integer field to specify the offset from which char in the value the fields should start to be filled. E.g. if the provided value is `345235` and the field is configured with offset 3 and has 3 cells, the resulting value will be `235`. Defaults to 0.
{
    "bbox": {
        "x": 72.15405575993107,
        "y": 556.1774688664345,
        "width": 201.3371400656083,
        "height": 11.637984974890685
    },
    "name": "key",
    "page": 0,
    "required": true,
    "type": "text",
    "font_size": 9,
    "color": "black",
    "h_align": "L",
    "v_align": "B",
    "font": "helvetica"
}