Exis.PdfOcr 1.0.5

dotnet add package Exis.PdfOcr --version 1.0.5
                    
NuGet\Install-Package Exis.PdfOcr -Version 1.0.5
                    
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="Exis.PdfOcr" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Exis.PdfOcr" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Exis.PdfOcr" />
                    
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 Exis.PdfOcr --version 1.0.5
                    
#r "nuget: Exis.PdfOcr, 1.0.5"
                    
#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 Exis.PdfOcr@1.0.5
                    
#: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=Exis.PdfOcr&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Exis.PdfOcr&version=1.0.5
                    
Install as a Cake Tool

Exis.PdfOcr

Local, no-cloud OCR for PDFs — turns scanned (image) PDF pages into searchable PDFs by adding an invisible, selectable text layer over the page image. Built on Exis.PdfEditor, so the output round-trips through the same find/replace, redaction, and extraction APIs as any digital PDF.

Designed for workflows like HIPAA medical-document batch processing: 100% on-device, no network calls, and per-page OCR confidence is surfaced so you can flag low-confidence pages for human review.

Packages

Package What it is Target
Exis.PdfOcr Cross-platform core: orchestration + IPdfRasterizer/IOcrProvider contracts. No native deps. netstandard2.0, net8.0
Exis.PdfOcr.Tesseract Default OCR engine (TesseractOCR). Ships English data. netstandard2.0, net8.0
Exis.PdfOcr.Windows Default page rasterizer (image-extract fast path + Windows.Data.Pdf). net8.0-windows

Install all three for the batteries-included Windows experience:

dotnet add package Exis.PdfOcr
dotnet add package Exis.PdfOcr.Tesseract
dotnet add package Exis.PdfOcr.Windows

The core targets the same netstandard2.0;net8.0 surface as Exis.PdfEditor, so the same WPF (.NET), MAUI, and .NET Framework projects can consume it.

Usage

using Exis.PdfEditor;   // licensing
using Exis.PdfOcr;

// Exis.PdfOcr builds on the licensed Exis.PdfEditor — initialise it once at startup.
ExisLicense.Initialize();              // or ExisLicense.Initialize("XXXX-XXXX-XXXX-XXXX");

var result = await PdfOcr.MakeSearchableAsync(
    "input.pdf", "output.pdf", new OcrOptions { Languages = ["eng"] });

Console.WriteLine($"OCR'd {result.PagesProcessed}, skipped {result.PagesSkipped}, " +
                  $"avg confidence {result.AverageConfidence:P0}");

// Flag low-confidence pages for human review — confidence is never swallowed.
foreach (var page in result.Pages)
    if (page.WasOcrd && page.Confidence < 0.80)
        Console.WriteLine($"  Page {page.PageNumber} needs review (conf {page.Confidence:P0})");
  • Digital and already-OCR'd pages pass through untouched — only true scans are rasterized and recognized, which protects quality and is fast on mixed documents.
  • The output's text layer is invisible (PDF render mode 3) and positioned over the page image, so the page looks identical but text is now selectable and findable.

Progress reporting

var progress = new Progress<OcrProgress>(p =>
    Console.WriteLine($"[{p.Phase}] page {p.PageNumber}/{p.TotalPages}"));

await PdfOcr.MakeSearchableAsync("in.pdf", "out.pdf", new OcrOptions(), progress);

Languages

OcrOptions.Languages are Tesseract language codes ("eng", "spa", "vie", …). The Exis.PdfOcr.Tesseract package ships English (eng.traineddata). To add languages, drop the extra xxx.traineddata files into the package's tessdata folder (next to eng.traineddata in your app's output) and list them:

new OcrOptions { Languages = ["eng", "spa", "vie"] }

The invisible text layer embeds a Unicode font (DejaVu Sans), so accented and non-Latin names (e.g. Nguyễn, Peña) survive find/replace intact rather than being mangled.

MAUI / packaged apps

Where trained data isn't on disk as a plain file, ship it as a MauiAsset, extract it to a readable folder on first run, and point the provider at it:

var provider = new TesseractOcrProvider(tessdataPath: extractedTessdataDir);
await PdfOcr.MakeSearchableAsync("in.pdf", "out.pdf", new OcrOptions(), provider: provider);

Custom rasterizer / OCR engine

Both seams are pluggable. Implement IPdfRasterizer (e.g. a future Mac/Linux renderer) or IOcrProvider, and pass it to MakeSearchableAsync. If you omit them, the core discovers the Windows rasterizer and Tesseract provider by reflection — so the core itself never references Windows.* or the native OCR binaries.

Note on scanned-page de-identification

Replacing text in the OCR layer changes the selectable text, not the underlying scanned pixels: the visible image still shows the original characters. To remove a name from the visible scan as well, follow OCR with a pixel-redaction pass over the matched word boxes (Exis.PdfEditor's PdfRedactor). The OCR layer is what makes those words findable.

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 was computed.  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 was computed.  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 Exis.PdfOcr:

Package Downloads
Exis.PdfOcr.Windows

Windows page rasterizer for Exis.PdfOcr. Implements IPdfRasterizer using a fast path that extracts full-page scan images directly, falling back to the built-in Windows.Data.Pdf renderer for other pages. No native binary to redistribute — Windows.Data.Pdf ships with Windows. Made in USA.

Exis.PdfOcr.Tesseract

Default local OCR engine for Exis.PdfOcr, wrapping the TesseractOCR engine (Tesseract 5). Ships English (eng) trained data; add more languages by dropping their .traineddata files next to it. No cloud calls. Made in USA.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 44 5/27/2026