Class FormLine

java.lang.Object
com.azure.ai.formrecognizer.models.FormElement
com.azure.ai.formrecognizer.models.FormLine

public final class FormLine extends FormElement
Represents a line of text and its appearance.
  • Constructor Details

    • FormLine

      public FormLine(String text, FieldBoundingBox boundingBox, Integer pageNumber, List<FormWord> words)
      Creates raw OCR item. When includeFieldElements is set to true, a list of recognized text lines.
      Parameters:
      text - The text content of recognized field.
      boundingBox - The BoundingBox of the recognized field.
      pageNumber - the page number.
      words - The list of word element references.
  • Method Details

    • getWords

      public List<FormWord> getWords()
      Get the list of words in the text line.
      Returns:
      the unmodifiable list of words in the FormLine.
    • getBoundingBox

      public FieldBoundingBox getBoundingBox()
      BoundingBox property of the element.
      Overrides:
      getBoundingBox in class FormElement
      Returns:
      the bounding box of the element.
    • getText

      public String getText()
      The text content of the form element.
      Overrides:
      getText in class FormElement
      Returns:
      The text content of the form element.
    • getPageNumber

      public int getPageNumber()
      Get the 1-based page number in the input document.
      Overrides:
      getPageNumber in class FormElement
      Returns:
      the page number value.
    • getAppearance

      public TextAppearance getAppearance()
      Get the appearance of the text line.
      Returns:
      the appearance of the text line.