Aspose.OCR FOSS for .NET — Frequently Asked Questions
Licensing & Open Source
What is the licensing model?
Aspose.OCR FOSS for .NET is released under the MIT License. You can use, modify, and redistribute it — including in commercial products — without additional licensing fees.
Can I use it in commercial products?
Yes. The MIT License permits commercial use, modification, and redistribution, as long as the original copyright notice and license text are retained.
Installation & Requirements
How do I install Aspose.OCR FOSS for .NET?
dotnet add package Aspose.OCR.FOSSIt targets .NET Standard 2.0, .NET Framework 4.8, and .NET 8.0 or later.
Are there any native or external dependencies?
It depends on Aspose.PDF.FOSS (for rendering PDF pages), Microsoft.ML.OnnxRuntime (for
running the embedded recognition models), and System.Drawing.Common (for image decoding —
Windows only for image processing). No external OCR service is required; all three ONNX
models are embedded in the assembly.
Recognition Scope
What languages does it recognize?
Latin-script text. There is no language-selection parameter, and non-Latin scripts are not covered by the embedded recognition model.
What input types are supported?
Only InputType.SingleImage and InputType.PDF. Constructing an OcrInput with any other
input type causes AsposeOcr.Recognize() to throw NotSupportedException.
Does it return anything besides the recognized text?
Yes. Each RecognitionResult also returns RecognitionLinesResult — a list of
RecognitionResult.LinesResult, each with the line’s text (TextInLine) and its
pixel-coordinate bounding box (Line, a System.Drawing.Rectangle).
API Usage
What is the typical recognition pattern?
Construct an AsposeOcr, build an OcrInput with the appropriate InputType, add one or
more files with OcrInput.Add(), and call AsposeOcr.Recognize(). The returned OcrOutput
holds one RecognitionResult per image or PDF page.
using Aspose.OCR;
var api = new AsposeOcr();
using var input = new OcrInput(InputType.SingleImage);
input.Add("scan.png");
RecognitionResult result = api.Recognize(input)[0];
Console.WriteLine(result.RecognitionText);Can I recognize multiple files in one call?
Yes. Add multiple files to the same OcrInput before calling Recognize(). OcrOutput
preserves the order the files were added in.
Known Limitations
Does Recognize() validate its input?
Yes. It throws ArgumentNullException for a null input, NotSupportedException for an
unsupported InputType, and FileNotFoundException if a queued path does not exist — before
any model inference runs.