# PdfOcrMergeOptions

Controls canonical parsing, OCR rendering, confidence filtering, and native-text overlap removal.

Class 

`OfficeIMO.Pdf.Ocr`

**Namespace**

`OfficeIMO.Pdf.Ocr`

**Assembly**

`OfficeIMO.Pdf.Ocr`

**Source revision**

`063fe3ee9839` with working tree changes

**Source**

[PdfOcrMergeOptions.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L13)

**Modifiers**

sealed

Controls canonical parsing, OCR rendering, confidence filtering, and native-text overlap removal.

## Inheritance

- object
- PdfOcrMergeOptions

## Usage

Explore 11 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

- Method [PdfOcrMergeOptions.Clone](/api/pdf-ocr/officeimo-pdf-ocr-pdfocrmergeoptions/#method-clone)

### Accepted by parameters 10

- Method [PdfFormOcrExtensions.PrepareFormOcrAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfformocrextensions/#method-prepareformocrasync-officeimo-pdf-pdfdocument-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfImageOcrExtensions.MakeSearchableAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfimageocrextensions/#method-makesearchableasync-officeimo-pdf-pdfimagedocumentsource-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfImageOcrExtensions.PrepareSearchableOcrAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfimageocrextensions/#method-preparesearchableocrasync-officeimo-pdf-pdfimagedocumentsource-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfImageOcrExtensions.ReadWithOcrAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfimageocrextensions/#method-readwithocrasync-officeimo-pdf-pdfimagedocumentsource-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfOcrExtensions.MakeSearchableAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfocrextensions/#method-makesearchableasync-officeimo-pdf-pdfdocument-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfOcrExtensions.PrepareOrientationReviewAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfocrextensions/#method-prepareorientationreviewasync-officeimo-pdf-pdfdocument-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfOcrExtensions.PrepareSearchableOcrAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfocrextensions/#method-preparesearchableocrasync-officeimo-pdf-pdfdocument-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfOcrExtensions.PreviewScanAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfocrextensions/#method-previewscanasync-officeimo-pdf-pdfdocument-int32-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfOcrExtensions.ReadWithOcrAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfocrextensions/#method-readwithocrasync-officeimo-pdf-pdfdocument-officeimo-ocr-iocrengine-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`
- Method [PdfOcrRedactionExtensions.SearchRedactionCandidatesWithOcrAsync](/api/pdf-ocr/officeimo-pdf-ocr-pdfocrredactionextensions/#method-searchredactioncandidateswithocrasync-officeimo-pdf-pdfdocument-officeimo-ocr-iocrengine-officeimo-pdf-pdfredactionsearchoptions-officeimo-pdf-ocr-pdfocrmergeoptions-threading-cancellationtoken) parameter `options`

Filter members 

Show inherited

## Constructors

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

[PdfOcrMergeOptions.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L13)

## Methods

`public PdfOcrMergeOptions Clone()` [#](#method-clone)

[PdfOcrMergeOptions.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L88)

Creates an independent option snapshot.

Returns

`PdfOcrMergeOptions`

`public int[] GetSelectedPages(int pageCount)` [#](#method-getselectedpages-int32)

[PdfOcrMergeOptions.cs:133](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L133)

Resolves the page selection and optional region restriction against an actual document page count.

Parameters

**pageCount int required**

Returns

`int[]`

## 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 PdfLoadOptions ReadOptions { get; set; }` [#](#property-readoptions)

[PdfOcrMergeOptions.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L13)

Canonical semantic-read settings, including page selection, layout, stage customization, and understanding budgets. OCR evidence is processed by this same read pipeline.

`public bool ReconstructLayout { get; set; }` [#](#property-reconstructlayout)

[PdfOcrMergeOptions.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L19)

Rebuilds OCR lines, columns, tables, and reading order from accepted word geometry using the canonical understanding stages. False preserves provider line hierarchy and order. Use true when a provider joins separate columns into one line. Original word geometry is retained.

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

[PdfOcrMergeOptions.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L21)

Requested language tag or provider-specific expression forwarded to the OCR engine.

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

[PdfOcrMergeOptions.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L23)

Optional source path or logical name attached to OCR requests.

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

[PdfOcrMergeOptions.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L25)

Optional stable source identifier attached to OCR requests.

`public bool UseLineSpansWhenWordsUnavailable { get; set; }` [#](#property-uselinespanswhenwordsunavailable)

[PdfOcrMergeOptions.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L27)

Uses line spans when the engine does not return word spans.

`public double ConfidenceWhenUnavailable { get; set; }` [#](#property-confidencewhenunavailable)

[PdfOcrMergeOptions.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L29)

Confidence used when neither a span nor the overall result reports one. Defaults to zero.

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

[PdfOcrMergeOptions.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L31)

Provider-specific scalar options forwarded to the OCR engine.

`public double Dpi { get; set; }` [#](#property-dpi)

[PdfOcrMergeOptions.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L34)

OCR render DPI.

`public IOfficeRasterImageCodec? ImageCodec { get; set; }` [#](#property-imagecodec)

[PdfOcrMergeOptions.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L36)

Optional shared raster decoder for source encodings such as JPEG 2000.

`public OfficeScanProcessingOptions? ScanProcessing { get; set; }` [#](#property-scanprocessing)

[PdfOcrMergeOptions.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L38)

Optional shared scan-cleanup settings. Null preserves the rendered samples.

`public OfficeScanPerspectiveOptions? Perspective { get; set; }` [#](#property-perspective)

[PdfOcrMergeOptions.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L40)

Optional explicit perspective corners, relative to each selected region or full page. Applied before affine cleanup.

`public IReadOnlyList<PdfOcrPageRegion> Regions { get; set; }` [#](#property-regions)

[PdfOcrMergeOptions.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L43)

Optional OCR rectangles, at most one per page. A nonempty list sends only these pages and cropped pixels to the provider. Every region page must also belong to ReadOptions.PageSelection when it is supplied.

`public bool DetectOrientation { get; set; }` [#](#property-detectorientation)

[PdfOcrMergeOptions.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L45)

Requests provider orientation evidence before cleanup. Unsupported or inconclusive detection retains the source orientation.

`public double MinimumOrientationConfidence { get; set; }` [#](#property-minimumorientationconfidence)

[PdfOcrMergeOptions.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L47)

Minimum normalized provider orientation confidence required to rotate the OCR image.

`public double MinimumConfidence { get; set; }` [#](#property-minimumconfidence)

[PdfOcrMergeOptions.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L49)

Minimum accepted provider confidence from 0 through 1.

`public double NativeTextOverlapThreshold { get; set; }` [#](#property-nativetextoverlapthreshold)

[PdfOcrMergeOptions.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L51)

Overlap ratio at which OCR words duplicating native text are removed.

`public int MaxPages { get; set; }` [#](#property-maxpages)

[PdfOcrMergeOptions.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L53)

Maximum pages sent to the provider.

`public TimeSpan ProviderTimeout { get; set; }` [#](#property-providertimeout)

[PdfOcrMergeOptions.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L55)

Maximum total duration for one provider call, including exclusive-engine wait time. Defaults to two minutes.

`public long MaxPixelsPerPage { get; set; }` [#](#property-maxpixelsperpage)

[PdfOcrMergeOptions.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L57)

Maximum pixels rendered per page.

`public int MaxConcurrentPages { get; set; }` [#](#property-maxconcurrentpages)

[PdfOcrMergeOptions.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L59)

Maximum page requests in flight. Providers without concurrent-request support always run one at a time.

`public long MaxRenderedBytesPerPage { get; set; }` [#](#property-maxrenderedbytesperpage)

[PdfOcrMergeOptions.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L61)

Maximum encoded PNG bytes for one OCR request.

`public int MaxOcrSpansPerPage { get; set; }` [#](#property-maxocrspansperpage)

[PdfOcrMergeOptions.cs:63](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L63)

Maximum detailed spans inspected from the provider for one page.

`public int MaxOcrWordsPerPage { get; set; }` [#](#property-maxocrwordsperpage)

[PdfOcrMergeOptions.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L65)

Maximum OCR words accepted from the provider for one page.

`public int MaxOcrTextCharactersPerPage { get; set; }` [#](#property-maxocrtextcharactersperpage)

[PdfOcrMergeOptions.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L67)

Maximum aggregate selected OCR span characters inspected for one page.

`public int MaxOcrHierarchyCharactersPerPage { get; set; }` [#](#property-maxocrhierarchycharactersperpage)

[PdfOcrMergeOptions.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L69)

Maximum aggregate raw block, paragraph, and line identifier characters inspected for one page.

`public int MaxDiagnosticsPerPage { get; set; }` [#](#property-maxdiagnosticsperpage)

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

Maximum provider diagnostics accepted for one page.

`public int MaxDiagnosticCharactersPerPage { get; set; }` [#](#property-maxdiagnosticcharactersperpage)

[PdfOcrMergeOptions.cs:73](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L73)

Maximum aggregate provider diagnostic characters accepted for one page.

`public int MaxProviderMetadataCharactersPerPage { get; set; }` [#](#property-maxprovidermetadatacharactersperpage)

[PdfOcrMergeOptions.cs:75](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L75)

Maximum aggregate provider, model, and language metadata characters accepted for one page.

`public int MaxNativeTextBlocksPerPage { get; set; }` [#](#property-maxnativetextblocksperpage)

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

Maximum logical native text blocks and raw native spans considered for OCR overlap on one page.

`public int MaxNativeTextCharactersPerPage { get; set; }` [#](#property-maxnativetextcharactersperpage)

[PdfOcrMergeOptions.cs:79](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L79)

Maximum aggregate native span characters inspected for OCR overlap on one page, including concealed spans.

`public long MaxNativeTextOverlapComparisonsPerPage { get; set; }` [#](#property-maxnativetextoverlapcomparisonsperpage)

[PdfOcrMergeOptions.cs:81](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L81)

Maximum native-text overlap comparisons performed for one page.

`public int MaxNativeTextOverlapIntersectionsPerWord { get; set; }` [#](#property-maxnativetextoverlapintersectionsperword)

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

Maximum overlapping native-text fragments retained while testing one OCR word.

`public int MaxMergedTextCharactersPerPage { get; set; }` [#](#property-maxmergedtextcharactersperpage)

[PdfOcrMergeOptions.cs:85](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Pdf.Ocr/PdfOcrMergeOptions.cs#L85)

Maximum characters retained in one merged native/OCR text result.

<!-- PowerForge markdown artifact sha256:CDC83A059F413F10405037F3614559222AE9BCBD9D8CC0051253A21A8DF6861F -->
