Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfImageOcrExtensions

OfficeIMO.Pdf.Ocr

Namespace
OfficeIMO.Pdf.Ocr
Assembly
OfficeIMO.Pdf.Ocr
Source revision
3b680b1b6fb1 with working tree changes
Modifiers
static

Recognizes standalone raster images through the canonical positioned-text reconstruction pipeline.

Inheritance

  • object
  • PdfImageOcrExtensions

Remarks

Recognition uses the source resolution, rather than rendering a PDF intermediate. The resulting logical document can be passed to existing Word, Excel, HTML and other format adapters. Animated and multi-page images are rejected; supply separate static sources when every frame or page is required.

Methods

public static async Task<PdfSearchableOcrResult> MakeSearchableAsync(PdfImageDocumentSource image, IOcrEngine engine, PdfOcrMergeOptions? options = null, CancellationToken cancellationToken = default) #

Creates an in-memory searchable PDF preserving the image and adding all accepted OCR words.

Parameters

image OfficeIMO.Pdf.PdfImageDocumentSource required
engine OfficeIMO.Ocr.IOcrEngine required
options OfficeIMO.Pdf.Ocr.PdfOcrMergeOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static Task<PdfSearchableOcrReview> PrepareSearchableOcrAsync(PdfImageDocumentSource image, IOcrEngine engine, PdfOcrMergeOptions? options = null, CancellationToken cancellationToken = default) #

Recognizes an image and retains a private image-page snapshot for review and searchable PDF generation.

Parameters

image OfficeIMO.Pdf.PdfImageDocumentSource required
engine OfficeIMO.Ocr.IOcrEngine required
options OfficeIMO.Pdf.Ocr.PdfOcrMergeOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static async Task<PdfOcrMergeResult> ReadWithOcrAsync(PdfImageDocumentSource image, IOcrEngine engine, PdfOcrMergeOptions? options = null, CancellationToken cancellationToken = default) #

Recognizes a captured image and reconstructs editable text and tables without writing an output file.

Parameters

image OfficeIMO.Pdf.PdfImageDocumentSource required
engine OfficeIMO.Ocr.IOcrEngine required
options OfficeIMO.Pdf.Ocr.PdfOcrMergeOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<PdfOcrMergeResult>