FormRecognizerClient Class

Definition

This class provides a synchronous client that contains all the operations that apply to Azure Form Recognizer. Operations allowed by the client are recognizing receipt, business card, invoice and identity document data from input documents, recognizing layout information and analyzing custom forms for predefined data.

Instantiating a synchronous Form Recognizer Client

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.instantiation}

public final class FormRecognizerClient
Inheritance
java.lang.Object
FormRecognizerClient

Inherited Members

java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) java.lang.Object.finalize() java.lang.Object.getClass() java.lang.Object.hashCode() java.lang.Object.notify() java.lang.Object.notifyAll() java.lang.Object.toString() java.lang.Object.wait() java.lang.Object.wait(long) java.lang.Object.wait(long,int)

Methods

beginRecognizeBusinessCards(InputStream businessCard, long length)

Recognizes business card data from the provided document data using optical character recognition (OCR) and a prebuilt trained business card model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a business card.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeBusinessCards#InputStream-long}

beginRecognizeBusinessCards(InputStream businessCard, long length, RecognizeBusinessCardsOptions recognizeBusinessCardsOptions, Context context)

Recognizes business card data from the provided document data using optical character recognition (OCR) and a prebuilt trained business card model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a business card.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeBusinessCards#InputStream-long-RecognizeBusinessCardsOptions-Context}

beginRecognizeBusinessCardsFromUrl(String businessCardUrl)

Recognizes business card data from document using optical character recognition (OCR) and a prebuilt business card trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a business card.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeBusinessCardsFromUrl#string}

beginRecognizeBusinessCardsFromUrl(String businessCardUrl, RecognizeBusinessCardsOptions recognizeBusinessCardsOptions, Context context)

Recognizes business card data from documents using optical character recognition (OCR) and a prebuilt business card trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a business card.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeBusinessCardsFromUrl#string-RecognizeBusinessCardsOptions-Context}

beginRecognizeContent(InputStream form, long length)

Recognizes layout data using optical character recognition (OCR) and a custom trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long}

beginRecognizeContent(InputStream form, long length, RecognizeContentOptions recognizeContentOptions, Context context)

Recognizes content/layout data from the provided document data using optical character recognition (OCR).

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Content recognition supports auto language identification and multilanguage documents, so only provide a language code if you would like to force the documented to be processed as that specific language in the RecognizeContentOptions.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long-RecognizeContentOptions-Context}

beginRecognizeContentFromUrl(String formUrl)

Recognizes content/layout data from documents using optical character recognition (OCR).

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string}

beginRecognizeContentFromUrl(String formUrl, RecognizeContentOptions recognizeContentOptions, Context context)

Recognizes content/layout data using optical character recognition (OCR).

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.

Content recognition supports auto language identification and multilanguage documents, so only provide a language code if you would like to force the documented to be processed as that specific language in the RecognizeContentOptions.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string-RecognizeContentOptions-Context}

beginRecognizeCustomForms(String modelId, InputStream form, long length)

Recognizes form data from documents using optical character recognition (OCR) and a custom trained model with or without labels.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#string-InputStream-long}

beginRecognizeCustomForms(String modelId, InputStream form, long length, RecognizeCustomFormsOptions recognizeCustomFormsOptions, Context context)

Recognizes form data from documents using optical character recognition (OCR) and a custom trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#string-InputStream-long-RecognizeCustomFormsOptions-Context}

beginRecognizeCustomFormsFromUrl(String modelId, String formUrl)

Recognizes form data from documents using optical character recognition (OCR) and a custom trained model with or without labels.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string}

beginRecognizeCustomFormsFromUrl(String modelId, String formUrl, RecognizeCustomFormsOptions recognizeCustomFormsOptions, Context context)

Recognizes form data from documents using optical character recognition (OCR) and a custom trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string-RecognizeCustomFormsOptions-Context}

beginRecognizeIdentityDocuments(InputStream identityDocument, long length)

Analyze identity documents using optical character recognition (OCR) and a prebuilt model trained on identity documents model to extract key information from passports and US driver licenses. See here for fields found on an identity document.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeIdentityDocuments#InputStream-long}

beginRecognizeIdentityDocuments(InputStream identityDocument, long length, RecognizeIdentityDocumentOptions recognizeIdentityDocumentOptions, Context context)

Analyze identity documents using optical character recognition (OCR) and a prebuilt model trained on identity documents model to extract key information from passports and US driver licenses. See here for fields found on an identity document.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeIdentityDocuments#InputStream-long-RecognizeIdentityDocumentOptions-Context}

beginRecognizeIdentityDocumentsFromUrl(String identityDocumentUrl)

Analyze identity documents using optical character recognition (OCR) and a prebuilt model trained on identity documents model to extract key information from passports and US driver licenses. See here for fields found on an identity document.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeIdentityDocumentsFromUrl#string}

beginRecognizeIdentityDocumentsFromUrl(String identityDocumentUrl, RecognizeIdentityDocumentOptions recognizeIdentityDocumentOptions, Context context)

Analyze identity documents using optical character recognition (OCR) and a prebuilt model trained on identity documents model to extract key information from passports and US driver licenses. See here for fields found on an identity document.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeIdentityDocumentsFromUrl#string-RecognizeIdentityDocumentOptions-Context}

beginRecognizeInvoices(InputStream invoice, long length)

Recognizes data from the provided document data using optical character recognition (OCR) and a prebuilt trained invoice model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a invoice.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeInvoices#InputStream-long}

beginRecognizeInvoices(InputStream invoice, long length, RecognizeInvoicesOptions recognizeInvoicesOptions, Context context)

Recognizes data from the provided document data using optical character recognition (OCR) and a prebuilt trained invoice model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a invoice.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeInvoices#InputStream-long-RecognizeInvoicesOptions-Context}

beginRecognizeInvoicesFromUrl(String invoiceUrl)

Recognizes invoice data from document using optical character recognition (OCR) and a prebuilt invoice trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on an invoice.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeInvoicesFromUrl#string}

beginRecognizeInvoicesFromUrl(String invoiceUrl, RecognizeInvoicesOptions recognizeInvoicesOptions, Context context)

Recognizes invoice data from documents using optical character recognition (OCR) and a prebuilt invoice trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeInvoicesFromUrl#string-RecognizeInvoicesOptions-Context}

beginRecognizeReceipts(InputStream receipt, long length)

Recognizes data from the provided document data using optical character recognition (OCR) and a prebuilt trained receipt model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a receipt.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long}

beginRecognizeReceipts(InputStream receipt, long length, RecognizeReceiptsOptions recognizeReceiptsOptions, Context context)

Recognizes data from the provided document data using optical character recognition (OCR) and a prebuilt trained receipt model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a receipt.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long-RecognizeReceiptsOptions-Context}

beginRecognizeReceiptsFromUrl(String receiptUrl)

Recognizes receipt data from document using optical character recognition (OCR) and a prebuilt receipt trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

See here for fields found on a receipt.

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string}

beginRecognizeReceiptsFromUrl(String receiptUrl, RecognizeReceiptsOptions recognizeReceiptsOptions, Context context)

Recognizes receipt data from documents using optical character recognition (OCR) and a prebuilt receipt trained model.

The service does not support cancellation of the long running operation and returns with an error message indicating absence of cancellation support

Code sample

{@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string-RecognizeReceiptsOptions-Context}

Applies to