Class RecognizeContentOptions

java.lang.Object
com.azure.ai.formrecognizer.models.RecognizeContentOptions

public final class RecognizeContentOptions extends Object
Options that may be passed when using recognize content APIs on Form Recognizer client.
  • Constructor Details

    • RecognizeContentOptions

      public RecognizeContentOptions()
  • Method Details

    • getContentType

      public FormContentType getContentType()
      Get the type of the form. Supported Media types including .pdf, .jpg, .png or .tiff type file stream.
      Returns:
      the contentType value.
    • getPollInterval

      public Duration getPollInterval()
      Get the duration between each poll for the operation status. If none is specified, a default of 5 seconds is used.
      Returns:
      the pollInterval value.
    • setContentType

      public RecognizeContentOptions setContentType(FormContentType contentType)
      Set the type of the form. Supported Media types including .pdf, .jpg, .png or .tiff type file stream.
      Parameters:
      contentType - the provided form content type.
      Returns:
      the updated RecognizeContentOptions value.
    • setPollInterval

      public RecognizeContentOptions setPollInterval(Duration pollInterval)
      Set the duration between each poll for the operation status. If none is specified, a default of 5 seconds is used.
      Parameters:
      pollInterval - the duration to specify between each poll for the operation status.
      Returns:
      the updated RecognizeContentOptions value.
    • getLanguage

      public FormRecognizerLanguage getLanguage()
      Get the BCP-47 language code of the text in the document. See supported language codes here.
      Returns:
      the language code for the text in the document.
    • setLanguage

      public RecognizeContentOptions setLanguage(FormRecognizerLanguage language)
      Set the BCP-47 language code of the text in the document. See supported language codes here.
      Parameters:
      language - the language code value to set.
      Returns:
      the updated RecognizeContentOptions value.
    • getPages

      public List<String> getPages()
      Get the custom page numbers for multi-page documents(PDF/TIFF). Input the number of the pages you want to get the recognized result for.

      For a range of pages, use a hyphen, ex - ["1-3"]. Separate each page or a page range with a comma, ex - ["1-3", 4].

      Returns:
      the list of custom page numbers for a multi page document.
    • setPages

      public RecognizeContentOptions setPages(List<String> pages)
      Set the custom page numbers for multi-page documents(PDF/TIFF). Input the number of the pages you want to get the recognized result for.

      For a range of pages, use a hyphen, ex - ["1-3"]. Separate each page or a page range with a comma, ex - ["1-3", 4].

      Parameters:
      pages - the custom page numbers value to set.
      Returns:
      the updated RecognizeContentOptions value.
    • getReadingOrder

      public FormReadingOrder getReadingOrder()
      Get the order in which recognized text lines are returned.
      Returns:
      the order in which the recognized lines are returned.
    • setReadingOrder

      public RecognizeContentOptions setReadingOrder(FormReadingOrder readingOrder)
      Specifies the order in which recognized text lines are returned. 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.
      Parameters:
      readingOrder - the order specifies in which text lines are returned
      Returns:
      the updated RecognizeContentOptions value.