# OcrRequest

One engine-neutral recognition request.

Class 

`OfficeIMO.Ocr`

**Namespace**

`OfficeIMO.Ocr`

**Assembly**

`OfficeIMO.Ocr`

**Source revision**

`063fe3ee9839` with working tree changes

**Source**

[OcrModels.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L68)

**Modifiers**

sealed

One engine-neutral recognition request. Document formats map their source objects into this contract without making OCR providers depend on Reader, PDF, Word, Excel, PowerPoint, or another format package.

## Inheritance

- object
- OcrRequest

## Usage

Explore 8 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.

### Accepted by parameters 8

- Method [AdaptiveOcrEngine.RecognizeAsync](/api/ocr/officeimo-ocr-adaptiveocrengine/#method-recognizeasync-officeimo-ocr-ocrrequest-threading-cancellationtoken) parameter `request`
- Method [AdaptiveOcrEngine.RecognizeWithReviewAsync](/api/ocr/officeimo-ocr-adaptiveocrengine/#method-recognizewithreviewasync-officeimo-ocr-ocrrequest-threading-cancellationtoken) parameter `request`
- Constructor [DelegateOcrEngine.DelegateOcrEngine](/api/ocr/officeimo-ocr-delegateocrengine/#constructor-ctor-string-func-officeimo-ocr-ocrrequest-system-threading-cancellationtoken-system-threading-tasks-task-officeimo-ocr-ocrresult-officeimo-ocr-ocrenginecapabilities) parameter `recognizeAsync`
- Method [DelegateOcrEngine.RecognizeAsync](/api/ocr/officeimo-ocr-delegateocrengine/#method-recognizeasync-officeimo-ocr-ocrrequest-threading-cancellationtoken) parameter `request`
- Method [IOcrEngine.RecognizeAsync](/api/ocr/officeimo-ocr-iocrengine/#method-recognizeasync-officeimo-ocr-ocrrequest-threading-cancellationtoken) parameter `request`
- Method [OcrEngineExecution.RecognizeAsync](/api/ocr/officeimo-ocr-ocrengineexecution/#method-recognizeasync-officeimo-ocr-ocrrequest-timespan-threading-cancellationtoken) parameter `request`
- Method [OcrEngineExecution.RecognizeAttachedAsync](/api/ocr/officeimo-ocr-ocrengineexecution/#method-recognizeattachedasync-officeimo-ocr-ocrrequest-timespan-officeimo-ocr-ocrresultcapturelimits-threading-cancellationtoken) parameter `request`
- Method [OcrEngineRunner.RecognizeAsync](/api/ocr/officeimo-ocr-ocrenginerunner/#method-recognizeasync-officeimo-ocr-iocrengine-officeimo-ocr-ocrrequest-timespan-threading-cancellationtoken) parameter `request`

Filter members 

Show inherited

## Constructors

`public OcrRequest()` [#](#constructor-ctor)

[OcrModels.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L68)

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public OcrOperation Operation { get; set; }` [#](#property-operation)

[OcrModels.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L66)

Requested operation. Existing callers and providers default to text recognition.

`public byte[] Payload { get; set; }` [#](#property-payload)

[OcrModels.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L68)

Validated raster payload supplied to the engine.

`public string MediaType { get; set; }` [#](#property-mediatype)

[OcrModels.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L71)

IANA media type for [OcrRequest.Payload](/api/ocr/officeimo-ocr-ocrrequest/).

`public string? FileName { get; set; }` [#](#property-filename)

[OcrModels.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L74)

Original or synthetic file name, used only as provider input metadata.

`public string? SourceId { get; set; }` [#](#property-sourceid)

[OcrModels.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L77)

Stable caller-owned identifier for the source document or artifact.

`public string? SourceName { get; set; }` [#](#property-sourcename)

[OcrModels.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L80)

Human-readable source path or logical name.

`public string? CandidateId { get; set; }` [#](#property-candidateid)

[OcrModels.cs:83](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L83)

Stable caller-owned identifier for this recognition candidate.

`public string? CandidateKind { get; set; }` [#](#property-candidatekind)

[OcrModels.cs:86](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L86)

Caller-defined candidate kind such as image, page, slide, or worksheet-image.

`public int? PageNumber { get; set; }` [#](#property-pagenumber)

[OcrModels.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L89)

One-based page or frame number within the source payload, when applicable.

`public int? PixelWidth { get; set; }` [#](#property-pixelwidth)

[OcrModels.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L92)

Raster width in pixels, when known.

`public int? PixelHeight { get; set; }` [#](#property-pixelheight)

[OcrModels.cs:95](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L95)

Raster height in pixels, when known.

`public OcrRegion? Region { get; set; }` [#](#property-region)

[OcrModels.cs:98](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L98)

Source region represented by the payload, when the caller extracted only part of an artifact.

`public OcrCoordinateUnit RegionCoordinateUnit { get; set; }` [#](#property-regioncoordinateunit)

[OcrModels.cs:101](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L101)

Coordinate unit used by [OcrRequest.Region](/api/ocr/officeimo-ocr-ocrrequest/).

`public string? Language { get; set; }` [#](#property-language)

[OcrModels.cs:104](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L104)

Requested language tag or provider-specific language expression, when configured.

`public IReadOnlyDictionary<string, string> ProviderOptions { get; set; }` [#](#property-provideroptions)

[OcrModels.cs:107](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Ocr/OcrModels.cs#L107)

Provider-specific scalar options supplied by the host.

<!-- PowerForge markdown artifact sha256:7603FF870C4E769DFCF7C073A672F99086DF5D26748B7A1754F09F2D8027E3C5 -->
