OfficeIMO.Ocr.Process
3.4.1
Prefix Reserved
dotnet add package OfficeIMO.Ocr.Process --version 3.4.1
NuGet\Install-Package OfficeIMO.Ocr.Process -Version 3.4.1
<PackageReference Include="OfficeIMO.Ocr.Process" Version="3.4.1" />
<PackageVersion Include="OfficeIMO.Ocr.Process" Version="3.4.1" />
<PackageReference Include="OfficeIMO.Ocr.Process" />
paket add OfficeIMO.Ocr.Process --version 3.4.1
#r "nuget: OfficeIMO.Ocr.Process, 3.4.1"
#:package OfficeIMO.Ocr.Process@3.4.1
#addin nuget:?package=OfficeIMO.Ocr.Process&version=3.4.1
#tool nuget:?package=OfficeIMO.Ocr.Process&version=3.4.1
OfficeIMO.Ocr.Process - external OCR process provider
OfficeIMO.Ocr.Process adapts a caller-configured executable to the shared OfficeIMO.Ocr.IOcrEngine contract through a versioned JSON file protocol. It works with images from any source; it does not depend on Reader, PDF, or another document-format package. The executable runs directly, without an inserted command shell.
Install
dotnet add package OfficeIMO.Ocr.Process
Configure an engine
using OfficeIMO.Ocr;
using OfficeIMO.Ocr.Process;
var engine = new ProcessOcrEngine(new ProcessOcrEngineOptions {
FileName = "/opt/my-ocr/recognize",
Arguments = new[] { "--request", "{request}" },
Id = "my-ocr",
Timeout = TimeSpan.FromMinutes(1),
MaxOutputBytes = 8L * 1024L * 1024L
});
OcrResult result = await engine.RecognizeAsync(new OcrRequest {
Payload = File.ReadAllBytes("scan.png"),
MediaType = "image/png",
FileName = "scan.png",
CandidateKind = "image",
Language = "eng"
});
Console.WriteLine(result.Text);
Each call receives an isolated request directory. The provider writes the raster payload and a camel-case request JSON file with schema id officeimo.ocr.process-request, version 2. The request's outputPath identifies where the executable must write a response envelope with schema id officeimo.ocr.process-response, version 2, and an OcrResult in its result property. Use ProcessOcrProtocol.SerializeResult(...) when the external bridge is implemented in .NET.
Available argument placeholders are {request}, {input}, {output}, {language}, {candidateId}, {sourceId}, and {pageNumber}. They are substituted as individual process arguments, not shell text.
Operational boundaries
- Input bytes, process stdout and stderr, response JSON size, and runtime are bounded by
ProcessOcrEngineOptions. - A format integration can add its own document-level limits.
OfficeIMO.Reader.Ocr, for example, bounds candidate count, aggregate input bytes, concurrency, recognized text, and span counts. - The runner contains descendants in a kill-on-close Windows Job Object, a
setsidprocess group on Linux/Unix, or a POSIX session launched through the system Perl on macOS. It fails closed when the host cannot provide one of those containment boundaries. - Executable paths, arguments, environment variables, and provider options are trusted host configuration. Do not build them directly from document content.
- Payload bytes are stored in owner-only per-request directories/files on Unix and are deleted by default. Set
KeepTemporaryFilesonly for controlled diagnostics.
Targets and license
- Targets:
netstandard2.0,net8.0,net10.0(net472is also included on Windows builds). - License: MIT.
Dependency footprint
- External: A caller-configured executable.
System.Text.Jsonis used for the versioned protocol on legacy targets. - OfficeIMO:
OfficeIMO.Ocrowns the engine-neutral request, result, geometry, capability, and diagnostic contracts.
See the complete OfficeIMO package map for related formats and conversion paths.
| Product | Versions 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. |
-
.NETFramework 4.7.2
- OfficeIMO.Ocr (>= 3.4.1)
- System.Text.Json (>= 10.0.7 && < 11.0.0)
-
.NETStandard 2.0
- OfficeIMO.Ocr (>= 3.4.1)
- System.Text.Json (>= 10.0.7 && < 11.0.0)
-
net10.0
- OfficeIMO.Ocr (>= 3.4.1)
-
net8.0
- OfficeIMO.Ocr (>= 3.4.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OfficeIMO.Ocr.Process:
| Package | Downloads |
|---|---|
|
OfficeIMO.Ocr.Tesseract
Optional Tesseract CLI provider for the engine-neutral OfficeIMO OCR contract. |
GitHub repositories
This package is not used by any popular GitHub repositories.