FormLine Class

An object representing an extracted line of text.

New in version v2.1: appearance property, support for to_dict and from_dict methods

Inheritance
azure.ai.formrecognizer._models.FormElement
FormLine

Constructor

FormLine(**kwargs)

Variables

text
str

The text content of the line.

bounding_box
list[Point]

A list of 4 points representing the quadrilateral bounding box that outlines the text. The points are listed in clockwise order: top-left, top-right, bottom-right, bottom-left. Units are in pixels for images and inches for PDF.

words
list[FormWord]

A list of the words that make up the line.

page_number
int

The 1-based number of the page in which this content is present.

kind
str

For FormLine, this is "line".

appearance
<xref:azure.ai.formrecognizer.Appearance>

An object representing the appearance of the line.

Methods

from_dict

Converts a dict in the shape of a FormLine to the model itself.

to_dict

Returns a dict representation of FormLine.

from_dict

Converts a dict in the shape of a FormLine to the model itself.

from_dict(data: dict) -> azure.ai.formrecognizer._models.FormLine

Parameters

data
dict
Required

A dictionary in the shape of FormLine.

data
Required

Returns

FormLine

Return type

to_dict

Returns a dict representation of FormLine.

to_dict() -> dict

Returns

dict

Return type