OfficeIMO.Reader.Ocr 3.6.1

Prefix Reserved
dotnet add package OfficeIMO.Reader.Ocr --version 3.6.1
                    
NuGet\Install-Package OfficeIMO.Reader.Ocr -Version 3.6.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OfficeIMO.Reader.Ocr" Version="3.6.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Reader.Ocr" Version="3.6.1" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Reader.Ocr" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OfficeIMO.Reader.Ocr --version 3.6.1
                    
#r "nuget: OfficeIMO.Reader.Ocr, 3.6.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OfficeIMO.Reader.Ocr@3.6.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OfficeIMO.Reader.Ocr&version=3.6.1
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Reader.Ocr&version=3.6.1
                    
Install as a Cake Tool

OfficeIMO.Reader.Ocr - OCR enrichment for Reader

nuget version

OfficeIMO.Reader.Ocr applies any OfficeIMO.Ocr.IOcrEngine to image candidates emitted by modular OfficeIMO readers. It adds recognized content to OfficeDocumentReadResult while preserving native text, source locations, assets, diagnostics, nested document results, and provider evidence. ApplyOcrAsync processes document- and page-owned candidates in one result. ApplyOcrTreeAsync also visits nested results with one shared execution budget.

Install

Install the integration, the required Reader format adapter, and one provider. For example, Word plus Tesseract:

dotnet add package OfficeIMO.Reader.Ocr
dotnet add package OfficeIMO.Reader.Word
dotnet add package OfficeIMO.Ocr.Tesseract

OfficeIMO.Reader.All does not include OCR providers or the OCR integration.

Recognize embedded document images

using OfficeIMO.Ocr.Tesseract;
using OfficeIMO.Reader;
using OfficeIMO.Reader.Word;

OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
    .AddWordHandler()
    .Build();

OfficeDocumentReadResult document = await reader.ReadDocumentAsync("scanned-notes.docx");
var engine = TesseractOcrEngine.CreateDefault();

OfficeDocumentOcrExecutionResult result = await document.ApplyOcrAsync(
    engine,
    new OfficeDocumentOcrExecutionOptions {
        Language = "eng+pol",
        MaxCandidates = 50,
        MaxDegreeOfParallelism = 2,
        CandidateTimeout = TimeSpan.FromMinutes(1)
    });

Console.WriteLine(result.Document.Markdown);
Console.WriteLine($"Recognized: {result.Report.RecognizedCandidateCount}");

Reader adapters can emit OCR candidates for raster images in Word, Excel, PowerPoint, OneNote, EPUB, email, PDF, standalone image files, and future formats. Candidate metadata stays in OfficeIMO.Reader.Core; no OCR runs during ordinary parsing.

This package owns candidate-to-asset validation, payload and hash checks, per-candidate timeout configuration, deterministic scheduling, aggregate result/span/diagnostic limits, diagnostic mapping, and normalized-document enrichment. Shared engine serialization and timeout supervision come from OfficeIMO.Ocr.OcrEngineRunner, so a non-concurrent instance is protected even when Reader and PDF use it simultaneously. OfficeDocumentOcrExecutionResult.Recognitions retains each bounded neutral OcrResult, including detailed geometry and provider provenance.

Use the same engine instance with OfficeIMO.Pdf.Ocr when PDF page rendering and searchable output are required. Use DelegateOcrEngine or another IOcrEngine implementation for hosted, native, or application-specific providers.

Recognize attachments and archive entries

Read the container with its required format handlers, then invoke the tree operation:

using OfficeIMO.Ocr.Tesseract;
using OfficeIMO.Reader;
using OfficeIMO.Reader.Email;
using OfficeIMO.Reader.Image;
using OfficeIMO.Reader.Zip;

var reader = new OfficeDocumentReaderBuilder()
    .AddEmailHandler()
    .AddZipHandler()
    .AddImageHandler()
    .Build();
var document = await reader.ReadDocumentAsync("message.eml");
var result = await document.ApplyOcrTreeAsync(TesseractOcrEngine.CreateDefault(),
    new OfficeDocumentOcrExecutionOptions {
        MaxDocuments = 50,
        MaxNestedDepth = 4,
        MaxCandidates = 100,
        MaxTotalInputBytes = 64L * 1024 * 1024,
        MaxTotalRecognizedCharacters = 2 * 1024 * 1024,
        TotalTimeout = TimeSpan.FromMinutes(3)
    });
Console.WriteLine(result.Document.Markdown);
foreach (var recognition in result.Recognitions)
    Console.WriteLine($"{recognition.DocumentPath}: {recognition.CandidateId}");

Add other format handlers when those attachments are supported. Tree execution preserves rich child results and adds newly recognized text to each containing result's blocks, chunks and Markdown without repeating its native text. DocumentId identifies the structural node; DocumentPath retains its source or virtual container path. Candidate and asset identifiers remain local to that node.

When native text is available only as chunks, enrichment captures it in chunk blocks before adding OCR blocks. The original chunks and their structured evidence remain available.

Candidate selection, materialized input bytes, newly accepted text, spans and span characters share their limits across all visited documents. The total engine-call deadline also spans the tree; local normalization and projection can finish after that deadline. Concurrent raw responses are retained only within the in-flight window and normalized in source order. Limit diagnostics and unresolved candidates remain visible. Document/depth limits preserve skipped subtrees and report them through SkippedDocumentCount. These bounds do not replace Reader's decoding limits or a provider's own process-memory limits.

OfficeDocumentOcrProcessor remains a per-document Reader processor. Use ApplyOcrTreeAsync after reading a container when the whole operation needs a shared budget and refreshed parent text. Reader JSON excludes binary payloads: materialize asset bytes again before executing OCR on a transported result.

Targets and dependency footprint

  • Targets: netstandard2.0, net8.0, net10.0 (net472 is also included on Windows builds).
  • OfficeIMO dependencies: OfficeIMO.Ocr and OfficeIMO.Reader.Core.
  • Not dependencies: PDF, Tesseract, process execution, cloud SDKs, native runtimes, or other Reader format packages.
  • License: MIT.

See the Reader Core README for reader construction and result contracts.

Recognition evidence

OCR-enriched OfficeDocumentBlock.Recognition carries an immutable OfficeDocumentRecognitionEvidence with the provider, model, language and available confidence/review measurements. JSON round trips and nested OCR projection preserve it. Direct ApplyOcrResults callers may supply detailed Recognition; omitted assessments remain unknown. Engine execution records word-confidence checks and preserves adaptive comparison outcomes. Truncation or normalization loss requires review.

Consumers must not treat confidence or matching OCR variants as approval. OfficeIMO.AI carries this evidence into its snapshot identity, citations and review reports.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on OfficeIMO.Reader.Ocr:

Package Downloads
OfficeIMO.Workflows

Typed local document workflows that compose first-party OfficeIMO conversion, PDF, and provenance capabilities.

OfficeIMO.DjVu.Pdf

Managed DjVu scanned-page PDFs with stored text and optional engine-neutral OCR.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.6.1 165 11/10/2026
3.6.0 217 11/6/2026
3.5.3 184 10/31/2026
3.5.2 300 10/24/2026
3.5.1 228 10/16/2026
3.4.5 666 10/10/2026
3.4.4 290 9/27/2026
3.4.3 286 9/12/2026
3.4.2 210 9/9/2026
3.4.1 191 9/7/2026
3.4.0 147 9/6/2026
3.3.0 130 9/2/2026