Sdílet prostřednictvím


DocumentStyle Class

  • java.lang.Object
    • com.azure.ai.documentintelligence.models.DocumentStyle

Implements

public final class DocumentStyle
implements JsonSerializable<DocumentStyle>

An object representing observed text styles.

Method Summary

Modifier and Type Method and Description
static DocumentStyle fromJson(JsonReader jsonReader)

Reads an instance of DocumentStyle from the JsonReader.

String getBackgroundColor()

Get the backgroundColor property: Background color in #rrggbb hexadecimal format..

String getColor()

Get the color property: Foreground color in #rrggbb hexadecimal format.

double getConfidence()

Get the confidence property: Confidence of correctly identifying the style.

DocumentFontStyle getFontStyle()

Get the fontStyle property: Font style.

DocumentFontWeight getFontWeight()

Get the fontWeight property: Font weight.

String getSimilarFontFamily()

Get the similarFontFamily property: Visually most similar font from among the set of supported font families, with fallback fonts following CSS convention (ex.

List<DocumentSpan> getSpans()

Get the spans property: Location of the text elements in the concatenated content the style applies to.

Boolean isHandwritten()

Get the isHandwritten property: Is content handwritten?.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static DocumentStyle fromJson(JsonReader jsonReader)

Reads an instance of DocumentStyle from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DocumentStyle if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getBackgroundColor

public String getBackgroundColor()

Get the backgroundColor property: Background color in #rrggbb hexadecimal format..

Returns:

the backgroundColor value.

getColor

public String getColor()

Get the color property: Foreground color in #rrggbb hexadecimal format.

Returns:

the color value.

getConfidence

public double getConfidence()

Get the confidence property: Confidence of correctly identifying the style.

Returns:

the confidence value.

getFontStyle

public DocumentFontStyle getFontStyle()

Get the fontStyle property: Font style.

Returns:

the fontStyle value.

getFontWeight

public DocumentFontWeight getFontWeight()

Get the fontWeight property: Font weight.

Returns:

the fontWeight value.

getSimilarFontFamily

public String getSimilarFontFamily()

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

Returns:

the similarFontFamily value.

getSpans

public List getSpans()

Get the spans property: Location of the text elements in the concatenated content the style applies to.

Returns:

the spans value.

isHandwritten

public Boolean isHandwritten()

Get the isHandwritten property: Is content handwritten?.

Returns:

the isHandwritten value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to