DevExpress.Docs.Ocr
26.2.2-beta
Prefix Reserved
dotnet add package DevExpress.Docs.Ocr --version 26.2.2-beta
NuGet\Install-Package DevExpress.Docs.Ocr -Version 26.2.2-beta
<PackageReference Include="DevExpress.Docs.Ocr" Version="26.2.2-beta" />
<PackageVersion Include="DevExpress.Docs.Ocr" Version="26.2.2-beta" />
<PackageReference Include="DevExpress.Docs.Ocr" />
paket add DevExpress.Docs.Ocr --version 26.2.2-beta
#r "nuget: DevExpress.Docs.Ocr, 26.2.2-beta"
#:package DevExpress.Docs.Ocr@26.2.2-beta
#addin nuget:?package=DevExpress.Docs.Ocr&version=26.2.2-beta&prerelease
#tool nuget:?package=DevExpress.Docs.Ocr&version=26.2.2-beta&prerelease
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.
Related Components/Packages
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 | Versions 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. |
-
.NETFramework 4.6.2
- DevExpress.Data (= 26.2.2-beta)
- DevExpress.Docs.Pdf (= 26.2.2-beta)
- DevExpress.Drawing (= 26.2.2-beta)
- DevExpress.Office.Core (= 26.2.2-beta)
- Microsoft.ML.OnnxRuntime.Managed (>= 1.31.0)
- SkiaSharp (>= 4.150.1)
-
net10.0
- DevExpress.Data (= 26.2.2-beta)
- DevExpress.Docs.Pdf (= 26.2.2-beta)
- DevExpress.Drawing (= 26.2.2-beta)
- DevExpress.Office.Core (= 26.2.2-beta)
- Microsoft.ML.OnnxRuntime.Managed (>= 1.31.0)
- SkiaSharp (>= 4.150.1)
-
net11.0
- DevExpress.Data (= 26.2.2-beta)
- DevExpress.Docs.Pdf (= 26.2.2-beta)
- DevExpress.Drawing (= 26.2.2-beta)
- DevExpress.Office.Core (= 26.2.2-beta)
- Microsoft.ML.OnnxRuntime.Managed (>= 1.31.0)
- SkiaSharp (>= 4.150.1)
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 |