Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

DelegateOcrEngine

OfficeIMO.Ocr

Namespace
OfficeIMO.Ocr
Assembly
OfficeIMO.Ocr
Source revision
063fe3ee9839 with working tree changes
Implements
IOcrEngine
Modifiers
sealed

Adapts a caller-owned callback, including cloud SDK integrations, to IOcrEngine.

Inheritance

  • object
  • DelegateOcrEngine

Constructors

public DelegateOcrEngine(string id, Func<OcrRequest, CancellationToken, Task<OcrResult>> recognizeAsync, OcrEngineCapabilities? capabilities = null) #

Creates a callback-backed OCR engine.

Parameters

id string required
recognizeAsync System.Func<OfficeIMO.Ocr.OcrRequest, System.Threading.CancellationToken, System.Threading.Tasks.Task<OfficeIMO.Ocr.OcrResult>> required
capabilities OfficeIMO.Ocr.OcrEngineCapabilities? = null optional

Methods

public Task<OcrResult> RecognizeAsync(OcrRequest request, CancellationToken cancellationToken = default) #

Recognizes text and optional detailed spans from one raster payload.

Parameters

request OfficeIMO.Ocr.OcrRequest required
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OcrResult>

Properties

public string Id { get; } #

Stable provider identifier used in diagnostics and provenance. The value must remain unchanged for the lifetime of this configured engine instance, and the untrimmed value must not exceed OcrEngineRunner.MaximumEngineIdCharacters characters.

public OcrEngineCapabilities Capabilities { get; } #

Stable capabilities exposed by this configured engine instance.