DevExpress.Docs.Ocr 26.2.2-beta

Prefix Reserved
This is a prerelease version of DevExpress.Docs.Ocr.
dotnet add package DevExpress.Docs.Ocr --version 26.2.2-beta
                    
NuGet\Install-Package DevExpress.Docs.Ocr -Version 26.2.2-beta
                    
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="DevExpress.Docs.Ocr" Version="26.2.2-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DevExpress.Docs.Ocr" Version="26.2.2-beta" />
                    
Directory.Packages.props
<PackageReference Include="DevExpress.Docs.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 DevExpress.Docs.Ocr --version 26.2.2-beta
                    
#r "nuget: DevExpress.Docs.Ocr, 26.2.2-beta"
                    
#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 DevExpress.Docs.Ocr@26.2.2-beta
                    
#: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=DevExpress.Docs.Ocr&version=26.2.2-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=DevExpress.Docs.Ocr&version=26.2.2-beta&prerelease
                    
Install as a Cake Tool

DevExpress OCR API for .NET

The DevExpress OCR API is a cross-platform .NET library that recognizes text in images and scanned PDF documents. Add this package to your project to convert scanned images and PDF files into searchable PDFs, or extract text, text lines, and words with their bounds and confidence scores.

The library runs recognition locally with built-in deep learning models (ONNX Runtime) and does not require external services or cloud APIs.

Cross-Platform Text Recognition

DevExpress OCR API is compatible with the following operating systems and platforms:

  • Windows, Linux, macOS
  • .NET 10+, .NET Framework 4.6.2+
  • Azure, AWS, Docker

Key Features

  • Image Recognition: Recognize text in PNG, JPEG, BMP, and other raster images.
  • Image to PDF Conversion: Convert scanned images into searchable PDF documents with a selectable text layer.
  • Scanned PDF Recognition: Recognize text in scanned PDF documents loaded with DevExpress PDF Document API.
  • Scanned PDF to Searchable PDF Conversion: Add recognized text to scanned PDF pages so that users can search, select, and copy it.
  • Page and Region Recognition: Recognize text throughout a document, on specific pages, or within selected regions.
  • Structured Results: Obtain recognized text as text fragments, lines, and words with bounds and confidence values.
  • Page Orientation Detection: Detect and correct rotated pages automatically.
  • Multithreading: Run OCR operations concurrently across multiple threads.
  • Custom Models and Providers: Use built-in recognition models or your own detection, recognition, and page orientation models. Implement a custom OCR provider to customize text recognition.

Examples

Install the packages. DevExpress.Docs.Ocr does not include the native ONNX Runtime, so add the Microsoft.ML.OnnxRuntime package as well.

dotnet add package DevExpress.Docs.Ocr
dotnet add package Microsoft.ML.OnnxRuntime --version 1.31.0

Example 1: Recognize Text in a PDF Document

Recognize text in a scanned PDF document, print it page by page, and save the document as a searchable PDF.

using System;
using System.IO;
using DevExpress.Docs.Ocr;
using DevExpress.Docs.Pdf;

using (FileStream input = File.OpenRead("Document.pdf"))
using (PdfDocument document = new PdfDocument(input))
using (DocTrOcrProvider provider = new DocTrOcrProvider()) {
    OcrEngine engine = new OcrEngine(provider);

    // Read the recognized text.
    PdfDocumentRecognitionResult result = engine.RecognizePdfDocument(document);
    foreach (PdfPageRecognitionResult pageResult in result.PageResults) {
        Console.WriteLine($"Page {pageResult.PageIndex + 1}:");
        foreach (PdfTextFragment fragment in pageResult.TextFragments)
            Console.WriteLine(fragment.Text);
    }

    // Add the recognized text to the document pages and save the result as a searchable PDF.
    result.ApplyToDocument();
    using (FileStream output = File.Create("Document-Searchable.pdf"))
        document.Save(output);
}

Example 2: Recognize Text in Images

Recognize text in an image, print each text fragment with its bounds, and save the result as a searchable PDF.

using System;
using System.IO;
using DevExpress.Docs.Ocr;
using DevExpress.Docs.Pdf;
using DevExpress.Drawing;

using (DXImage image = DXImage.FromStream(File.OpenRead("Document.png")))
using (DocTrOcrProvider provider = new DocTrOcrProvider()) {
    OcrEngine engine = new OcrEngine(provider);

    // Read the recognized text.
    ImageRecognitionResults results = engine.RecognizeImages(new[] { image });
    foreach (ImageRecognitionResult imageResult in results.ImageResults) {
        foreach (ImageTextFragment fragment in imageResult.TextFragments)
            Console.WriteLine($"{fragment.Bounds}: {fragment.Text}");
    }

    // Save the result as a searchable PDF.
    using (PdfDocument document = results.ToPdf())
    using (FileStream output = File.Create("Document-Searchable.pdf"))
        document.Save(output);
}

Evaluation Period, Pricing Options, and Licensing Terms

Whether using a 30-day evaluation version or a registered product, you must register your DevExpress.com license key on your machine. To obtain your license key, log in to the DevExpress Download Manager. Use your existing DevExpress.com account or create a new account for free. For detailed instructions, see License Key for DevExpress Products.

Once you have obtained and registered your license key, simply install this package to start a 30-day evaluation period.

To continue using DevExpress products after your trial period ends, purchase a license. This package is included in the following commercial subscriptions:

See DevExpress Subscriptions & Licensing for subscription comparison tables, purchasing FAQ, and licensing information.

After you purchase a license, download and register your up-to-date DevExpress license key to remove licensing warnings and trial messages.

DevExpress.Docs.Pdf - New DevExpress Document Processing APIs for advanced PDF generation and editing scenarios.

dotnet add package DevExpress.Docs.Pdf

DevExpress.Document.Processor - DevExpress Document Processing APIs for Word, Excel, and PDF documents.

dotnet add package DevExpress.Document.Processor

DevExpress.AIIntegration.Docs - AI-powered Extensions for DevExpress Document Processing APIs.

dotnet add package DevExpress.AIIntegration.Docs

DevExpress.Docs.Spreadsheet - New DevExpress Document Processing APIs for Excel workbooks.

dotnet add package DevExpress.Docs.Spreadsheet

DevExpress.Docs.Word - New DevExpress Document Processing APIs for Word documents.

dotnet add package DevExpress.Docs.Word

Demos

Documentation

Useful Online Resources

Product Compatible and additional computed target framework versions.
.NET 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 Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
26.2.2-beta 65 11/23/2026