Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfOcrMergeOptions

OfficeIMO.Pdf.Ocr

Namespace
OfficeIMO.Pdf.Ocr
Assembly
OfficeIMO.Pdf.Ocr
Source revision
063fe3ee9839 with working tree changes
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

Constructors

public PdfOcrMergeOptions() #

Methods

public PdfOcrMergeOptions Clone() #

Creates an independent option snapshot.

public int[] GetSelectedPages(int pageCount) #

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

Parameters

pageCount int required

Returns

int[]

Properties

public PdfLoadOptions ReadOptions { get; set; } #

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; } #

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; } #

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

public string? SourceName { get; set; } #

Optional source path or logical name attached to OCR requests.

public string? SourceId { get; set; } #

Optional stable source identifier attached to OCR requests.

public bool UseLineSpansWhenWordsUnavailable { get; set; } #

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

public double ConfidenceWhenUnavailable { get; set; } #

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

public IReadOnlyDictionary<string, string> ProviderOptions { get; set; } #

Provider-specific scalar options forwarded to the OCR engine.

public double Dpi { get; set; } #

OCR render DPI.

public IOfficeRasterImageCodec? ImageCodec { get; set; } #

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

public OfficeScanProcessingOptions? ScanProcessing { get; set; } #

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

public OfficeScanPerspectiveOptions? Perspective { get; set; } #

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

public IReadOnlyList<PdfOcrPageRegion> Regions { get; set; } #

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; } #

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

public double MinimumOrientationConfidence { get; set; } #

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

public double MinimumConfidence { get; set; } #

Minimum accepted provider confidence from 0 through 1.

public double NativeTextOverlapThreshold { get; set; } #

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

public int MaxPages { get; set; } #

Maximum pages sent to the provider.

public TimeSpan ProviderTimeout { get; set; } #

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

public long MaxPixelsPerPage { get; set; } #

Maximum pixels rendered per page.

public int MaxConcurrentPages { get; set; } #

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

public long MaxRenderedBytesPerPage { get; set; } #

Maximum encoded PNG bytes for one OCR request.

public int MaxOcrSpansPerPage { get; set; } #

Maximum detailed spans inspected from the provider for one page.

public int MaxOcrWordsPerPage { get; set; } #

Maximum OCR words accepted from the provider for one page.

public int MaxOcrTextCharactersPerPage { get; set; } #

Maximum aggregate selected OCR span characters inspected for one page.

public int MaxOcrHierarchyCharactersPerPage { get; set; } #

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

public int MaxDiagnosticsPerPage { get; set; } #

Maximum provider diagnostics accepted for one page.

public int MaxDiagnosticCharactersPerPage { get; set; } #

Maximum aggregate provider diagnostic characters accepted for one page.

public int MaxProviderMetadataCharactersPerPage { get; set; } #

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

public int MaxNativeTextBlocksPerPage { get; set; } #

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

public int MaxNativeTextCharactersPerPage { get; set; } #

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

public long MaxNativeTextOverlapComparisonsPerPage { get; set; } #

Maximum native-text overlap comparisons performed for one page.

public int MaxNativeTextOverlapIntersectionsPerWord { get; set; } #

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

public int MaxMergedTextCharactersPerPage { get; set; } #

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