FormPage Class

Represents a page recognized from the input document. Contains lines, words, selection marks, tables and page metadata.

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

Inheritance
builtins.object
FormPage

Constructor

FormPage(**kwargs)

Variables

page_number
int

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

text_angle
float

The general orientation of the text in clockwise direction, measured in degrees between (-180, 180].

width
float

The width of the image/PDF in pixels/inches, respectively.

height
float

The height of the image/PDF in pixels/inches, respectively.

unit
str

The LengthUnit used by the width, height, and bounding box properties. For images, the unit is "pixel". For PDF, the unit is "inch".

tables
list[FormTable]

A list of extracted tables contained in a page.

lines
list[FormLine]

When include_field_elements is set to true, a list of recognized text lines is returned. For calls to recognize content, this list is always populated. The maximum number of lines returned is 300 per page. The lines are sorted top to bottom, left to right, although in certain cases proximity is treated with higher priority. As the sorting order depends on the detected text, it may change across images and OCR version updates. Thus, business logic should be built upon the actual line location instead of order. The reading order of lines can be specified by the reading_order keyword argument (Note: reading_order only supported in begin_recognize_content and begin_recognize_content_from_url).

selection_marks
list[FormSelectionMark]

List of selection marks extracted from the page.

Methods

from_dict

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

to_dict

Returns a dict representation of FormPage.

from_dict

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

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

Parameters

data
dict
Required

A dictionary in the shape of FormPage.

Returns

FormPage

Return type

to_dict

Returns a dict representation of FormPage.

to_dict() -> dict

Returns

dict

Return type