DocumentStyle interface

An object representing observed text styles.

Properties

backgroundColor

Background color in #rrggbb hexadecimal format..

color

Foreground color in #rrggbb hexadecimal format.

confidence

Confidence of correctly identifying the style.

fontStyle

Font style.

fontWeight

Font weight.

isHandwritten

Is content handwritten?

similarFontFamily

Visually most similar font from among the set of supported font families, with fallback fonts following CSS convention (ex. 'Arial, sans-serif').

spans

Location of the text elements in the concatenated content the style applies to.

Property Details

backgroundColor

Background color in #rrggbb hexadecimal format..

backgroundColor?: string

Property Value

string

color

Foreground color in #rrggbb hexadecimal format.

color?: string

Property Value

string

confidence

Confidence of correctly identifying the style.

confidence: number

Property Value

number

fontStyle

Font style.

fontStyle?: string

Property Value

string

fontWeight

Font weight.

fontWeight?: string

Property Value

string

isHandwritten

Is content handwritten?

isHandwritten?: boolean

Property Value

boolean

similarFontFamily

Visually most similar font from among the set of supported font families, with fallback fonts following CSS convention (ex. 'Arial, sans-serif').

similarFontFamily?: string

Property Value

string

spans

Location of the text elements in the concatenated content the style applies to.

spans: DocumentSpan[]

Property Value