Delen via


RecognizeCustomFormsOptions Class

  • java.lang.Object
    • com.azure.ai.formrecognizer.models.RecognizeCustomFormsOptions

public final class RecognizeCustomFormsOptions

Options that may be passed when using recognize custom form APIs on Form Recognizer client.

Constructor Summary

Constructor Description
RecognizeCustomFormsOptions()

Create a RecognizeCustomFormsOptions object.

Method Summary

Modifier and Type Method and Description
FormContentType getContentType()

Get the type of the form.

List<String> getPages()

Get the custom page numbers for multi-page documents(PDF/TIFF).

Duration getPollInterval()

Get the duration between each poll for the operation status.

boolean isFieldElementsIncluded()

Get the boolean which specifies if to include form element references in the result.

RecognizeCustomFormsOptions setContentType(FormContentType contentType)

Set the type of the form.

RecognizeCustomFormsOptions setFieldElementsIncluded(boolean includeFieldElements)

Set the boolean which specifies if to include form element references in the result.

RecognizeCustomFormsOptions setPages(List<String> pages)

Set the custom page numbers for multi-page documents(PDF/TIFF).

RecognizeCustomFormsOptions setPollInterval(Duration pollInterval)

Set the duration between each poll for the operation status.

Methods inherited from java.lang.Object

Constructor Details

RecognizeCustomFormsOptions

public RecognizeCustomFormsOptions()

Create a RecognizeCustomFormsOptions object.

Method Details

getContentType

public FormContentType getContentType()

Get the type of the form. Supported Media types including .pdf, .jpg, .png, .tiff or .bmp type file stream.

Returns:

the contentType value.

getPages

public List 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.

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.

isFieldElementsIncluded

public boolean isFieldElementsIncluded()

Get the boolean which specifies if to include form element references in the result.

Returns:

the includeFieldElements value.

setContentType

public RecognizeCustomFormsOptions setContentType(FormContentType contentType)

Set the type of the form. Supported Media types including .pdf, .jpg, .png, .tiff or .bmp type file stream.

Parameters:

contentType - the provided form content type.

Returns:

the updated RecognizeCustomFormsOptions value.

setFieldElementsIncluded

public RecognizeCustomFormsOptions setFieldElementsIncluded(boolean includeFieldElements)

Set the boolean which specifies if to include form element references in the result.

Parameters:

includeFieldElements - the boolean to specify if to include form element references in the result.

Returns:

the updated RecognizeCustomFormsOptions value.

setPages

public RecognizeCustomFormsOptions setPages(List 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 RecognizeCustomFormsOptions value.

setPollInterval

public RecognizeCustomFormsOptions 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 RecognizeCustomFormsOptions value.

Applies to