ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.OCR Namespace / OCRManager Class / ExtractFromDocumentAsync Method / ExtractFromDocumentAsync(OCROptions,CancellationToken) Method
The OCR options. See OCROptions .
A System.Threading.CancellationToken used to control cancellation behavior for the returned task.

In This Topic
    ExtractFromDocumentAsync(OCROptions,CancellationToken) Method
    In This Topic
    Extracts information from a document image using the document image, page and output type specified in the ocrOptions. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Overloads Function ExtractFromDocumentAsync( _
       ByVal ocrOptions As OCROptions, _
       ByVal cancellationToken As CancellationToken _
    ) As Task(Of OCROutput)

    Parameters

    ocrOptions
    The OCR options. See OCROptions .
    cancellationToken
    A System.Threading.CancellationToken used to control cancellation behavior for the returned task.

    Return Value

    An OCROutput. The instance type depends upon the OCROptions.OutputType used. It can be null if no data can be extracted from the document.
    Exceptions
    ExceptionDescription
    ocrOptions is null.
    The document image could not be found or has an invalid extension for OCR.
    An error occurred within the OCR engine.
    The operation was canceled.
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Optical Character Recognition (OCR) technology is used to extract text from the document image. Text extraction and character recognition will be dependent on the quality and content of the image. There might also be difficulty in extracting text from complex data.
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.8 or higher.
    See Also