Class DocumentStyle

java.lang.Object
com.azure.ai.documentintelligence.models.DocumentStyle
All Implemented Interfaces:
com.azure.json.JsonSerializable<DocumentStyle>

public final class DocumentStyle extends Object implements com.azure.json.JsonSerializable<DocumentStyle>
An object representing observed text styles.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of DocumentStyle from the JsonReader.
    Get the backgroundColor property: Background color in #rrggbb hexadecimal format..
    Get the color property: Foreground color in #rrggbb hexadecimal format.
    double
    Get the confidence property: Confidence of correctly identifying the style.
    Get the fontStyle property: Font style.
    Get the fontWeight property: Font weight.
    Get the similarFontFamily property: Visually most similar font from among the set of supported font families, with fallback fonts following CSS convention (ex.
    Get the spans property: Location of the text elements in the concatenated content the style applies to.
    Get the isHandwritten property: Is content handwritten?.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Method Details

    • isHandwritten

      public Boolean isHandwritten()
      Get the isHandwritten property: Is content handwritten?.
      Returns:
      the isHandwritten 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.
    • getFontStyle

      public FontStyle getFontStyle()
      Get the fontStyle property: Font style.
      Returns:
      the fontStyle value.
    • getFontWeight

      public FontWeight getFontWeight()
      Get the fontWeight property: Font weight.
      Returns:
      the fontWeight value.
    • getColor

      public String getColor()
      Get the color property: Foreground color in #rrggbb hexadecimal format.
      Returns:
      the color value.
    • getBackgroundColor

      public String getBackgroundColor()
      Get the backgroundColor property: Background color in #rrggbb hexadecimal format..
      Returns:
      the backgroundColor value.
    • getSpans

      public List<DocumentSpan> getSpans()
      Get the spans property: Location of the text elements in the concatenated content the style applies to.
      Returns:
      the spans value.
    • getConfidence

      public double getConfidence()
      Get the confidence property: Confidence of correctly identifying the style.
      Returns:
      the confidence value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DocumentStyle>
      Throws:
      IOException
    • fromJson

      public static DocumentStyle fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the DocumentStyle.