OfficeIMO.Reader.Ocr 3.3.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package OfficeIMO.Reader.Ocr --version 3.3.0
                    
NuGet\Install-Package OfficeIMO.Reader.Ocr -Version 3.3.0
                    
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.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Reader.Ocr" Version="3.3.0" />
                    
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.3.0
                    
#r "nuget: OfficeIMO.Reader.Ocr, 3.3.0"
                    
#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.3.0
                    
#: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.3.0
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Reader.Ocr&version=3.3.0
                    
Install as a Cake Tool

OfficeIMO.Reader.Ocr - easy local OCR

OfficeIMO.Reader.Ocr is the one-call facade for local image OCR and searchable PDFs. It uses the engine-neutral Reader contracts, the optional Tesseract CLI provider, and the OfficeIMO.Pdf 3.3 rendering and mutation pipeline.

Runtime prerequisite

Install Tesseract once with the operating-system package manager. The facade discovers common installations and PATH automatically:

Windows: winget install --id UB-Mannheim.TesseractOCR --exact
macOS:   brew install tesseract
Ubuntu:  apt-get install tesseract-ocr

You can also set OFFICEIMO_TESSERACT_PATH or pass Tesseract.ExecutablePath. OfficeIMO does not silently install a system executable or bundle a community native build.

Searchable PDF in one call

using OfficeIMO.Pdf;
using OfficeIMO.Reader.Ocr;

PdfSearchableOcrResult result = await OfficeOcr.MakePdfSearchableAsync(
    "scanned.pdf",
    "scanned-searchable.pdf");

Console.WriteLine($"Added {result.AddedWordCount} OCR words.");

English is the default. Language choices are typed and discoverable, so callers do not need to know Tesseract language codes. The curated catalog contains 28 typed languages across Latin, Cyrillic, Arabic, Hebrew, Devanagari, Chinese, Japanese, Korean, Greek, and Vietnamese text. Requested language data is downloaded on demand from an immutable official tessdata_fast commit; orientation data is included automatically when the selected page segmentation mode needs it. Every file is checked against a package-pinned size and SHA-256 digest before it enters the versioned user cache.

var options = new OfficeOcrOptions();
options.Languages = OfficeOcrLanguage.English | OfficeOcrLanguage.Polish | OfficeOcrLanguage.German;

await OfficeOcr.MakePdfSearchableAsync("scan.pdf", "searchable.pdf", options);

Use OfficeOcrLanguages.Supported to populate a UI without maintaining another language list. Callers with their own trained-data files can set CustomLanguageExpression. That advanced escape hatch accepts raw Tesseract identifiers; ordinary use should stay on the typed property. The earlier Tesseract.Language configuration route remains supported for compatibility. Combining multiple non-default language routes is rejected instead of silently choosing one.

Reuse a session

Create a session once for repeated images or PDFs. Session creation verifies the executable version and available languages.

OfficeOcrSession session = await OfficeOcr.CreateSessionAsync(options);
OfficeOcrEngineResult image = await session.RecognizeImageAsync(pngBytes, "image/png");
PdfSearchableOcrResult pdf = await session.MakePdfSearchableAsync(PdfDocument.Load("scan.pdf"));

For other OCR engines, use IOfficeOcrEngine, OfficeOcrEnginePdfProvider, or IPdfOcrProvider directly. This keeps cloud SDKs, native inference runtimes, and experimental providers out of the default package graph.

Boundaries

  • Tesseract runs out of process with bounded input, output, time, and descendant-process containment.
  • Searchable PDF output is a full rewrite through OfficeIMO.Pdf mutation policy; signatures that forbid rewriting fail closed.
  • OCR words overlapping native PDF text are excluded by default.
  • The package is MIT. Tesseract and official trained data use Apache 2.0 and remain external runtime assets.
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 (1)

Showing the top 1 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.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.4.4 191 9/27/2026
3.4.3 266 9/12/2026
3.4.2 191 9/9/2026
3.4.1 168 9/7/2026
3.4.0 117 9/6/2026
3.3.0 108 9/2/2026