Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

TesseractOcrEngine

OfficeIMO.Ocr.Tesseract

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

Optional cross-platform OCR engine backed by an installed Tesseract command-line executable.

Inheritance

  • object
  • TesseractOcrEngine

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Constructors

public TesseractOcrEngine(TesseractOcrEngineOptions? options = null) #

Creates a Tesseract engine from an immutable option snapshot.

Parameters

options OfficeIMO.Ocr.Tesseract.TesseractOcrEngineOptions? = null optional

Methods

public static TesseractOcrEngine CreateDefault(TesseractOcrEngineOptions? options = null) #

Creates an engine using explicit, environment, PATH, and known-location runtime discovery.

Parameters

options OfficeIMO.Ocr.Tesseract.TesseractOcrEngineOptions? = null optional
public async Task<IReadOnlyList<string>> GetLanguagesAsync(CancellationToken cancellationToken = default) #

Returns sorted language identifiers from tesseract --list-langs.

Parameters

cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<IReadOnlyList<string>>
public async Task<string> GetVersionAsync(CancellationToken cancellationToken = default) #

Returns the first line from tesseract --version.

Parameters

cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<string>
public async 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 string ExecutablePath { get; } #

Resolved executable path or command captured by this engine.

public string? DefaultLanguage { get; } #

Default language expression captured by this engine.

public string? TessdataDirectory { get; } #

Configured trained-data directory captured by this engine.

public OcrEngineCapabilities Capabilities { get; } #

Stable capabilities exposed by this configured engine instance.