Powerful .NET OCR API to Perform Text Recognition

Integrate advanced OCR capabilities into your apps with Aspose Optical Character Recognition API for .NET. Seamlessly recognize and extract text from PNG, JPG, GIF, and BMP images, scanned photos, and PDFs, or convert images or PDFs to text.

Download Free TrialView All APIs

.NET OCR Engine with Superior Speed and Accuracy

Aspose.OCR for .NET is an advanced, efficient, and accurate optical character recognition API for effortlessly recognizing text in images and PDFs. It helps develop OCR functionality for .NET applications and offers enhanced processing speed, accuracy, and a comprehensive feature set. The powerful .NET OCR engine lets you perform precise text recognition and extraction from PDF files and JPEG, GIF, PNG, TIFF, and BMP images. You can build automated solutions for converting images and PDF documents to text, Word, Excel, XML, and JSON formats with the help of the OCR API for .NET.

Developers can enjoy a cross-platform text extraction experience using the Aspose.OCR for .NET API, as it can perform identically across Windows, Mac OS, and Linux-based environments. The API supports 27 different languages in Latin and Cyrillic scripts and thousands of Chinese characters and enables detecting and recognizing well-known typefaces. Additionally, you can recognize text from your scanned photos with the built-in ability to process noisy, skewed, or rotated images. Aspose.OCR for .NET library is a complete image analysis and text extraction solution that could augment your existing apps or help you create professional OCR solutions from scratch.

Getting Started

To correctly set up and use the .NET OCR API, please check the below-given details. It is advised to please refer to the list of prerequisites on the System Requirements page for the smooth installation of the optical character recognition API for .NET.

Aspose.OCR for .NET Installation

You can install the OCR library for C# .NET by downloading the MSI installer or DLLs from the downloads section. Or, you can use the NuGet package for setting it up. The command for the Visual Studio package manager console is provided below:

PM > Install-Package Aspose.OCR

Efficiently Perform OCR on PDF Documents and Convert Images to Text

Aspose.OCR for .NET API is an excellent choice for seamlessly performing optical character recognition (OCR) for .NET developers. Applying OCR to PDF documents and converting the recognized text to Word format requires only a few lines of code. Similarly, you can build image to text converter solutions using the text recognition library for C# .NET.

Recognize and extract text from PDF documents in .NET

Optical character recognition for scanned PDF documents is made simple with the help of Aspose.OCR for .NET. It is one of the most well-liked features of the .NET PDF document OCR API and equips anyone working with the API with all the required tools to recognize, extract, and convert text from PDF documents to multiple formats. Let’s take a look at the steps needed to perform OCR on PDF documents and convert the extracted text from PDF to Word format:

  • Instantiate the AsposeOcr class.
  • Create an object of the DocumentRecognitionSettings class.
  • Specify the OCR language.
  • Call the RecognizePdf() method to get RecognitionResult. Add file path and DocumentRecognitionSettings object as arguments.
  • Save the text using the SaveMultipageDocument() method. Add the output file path, the SaveFormat, and RecognitionResult objects as arguments
// This code example demonstrates how to OCR PDF documents and save the recognized text as DOCX.
// Initialize the PCR engine
AsposeOcr recognitionEngine = new AsposeOcr();
// Initialize recognition settings
DocumentRecognitionSettings recognitionSettings = new DocumentRecognitionSettings();
// Specify language for OCR. Multi-language by default
recognitionSettings.Language = Language.Eng;
// Recognize text from PDF
List results = recognitionEngine.RecognizePdf("C:\\MyFiles\\test.pdf", recognitionSettings);

// Save the recognized text as Word (DOCX) file
AsposeOcr.SaveMultipageDocument("C:\\Files\\OCR_result.docx", SaveFormat.Docx, results);

Effortlessly Convert Images to Searchable PDFs in .NET

The high-performance .NET OCR API allows developers to extract searchable text from scanned images and photos of different commonly-used image formats such as GIF, PNG, JPG, BMP, and TIFF. If you are looking to integrate OCR capabilities into your .NET apps, the image to text conversion feature could bolster them. Here, we will review the steps required for efficiently converting JPG to PDF using the robust OCR API for .NET:

  • Set input image file path for text recognition.
  • Create an AsposeOcr class instance
  • Use the RecognizeImage method to recognize text in your selected image file.
  • Save the processed file using the Save method, and add the output file name and the SaveFormat as arguments.
  • Ensure setting the resultant file to a searchable PDF document using SaveFormat.
// Set path for input image to recognize
string image = "OCR_test.jpg";
// Initialize AsposeOcr class instance
AsposeOcr api = new AsposeOcr();
// Recognize input image with RecognizeImage method
RecognitionResult result = api.RecognizeImage(image, new RecognitionSettings());
// Save output to searchable PDF file
result.Save("OCR_output.pdf", SaveFormat.Pdf);

The GitHub examples page of the Aspose Optical Character Recognition API for .NET includes more working code samples, please feel free to check them out. We also provide Free Online PDF OCR and Image to Text Converter, text recognition, and extract apps. You can use these free OCR apps on the fly using your mobile devices.

Easy-to-use .NET OCR Library for Text Extraction in Photos

Are you having difficulty reading and extracting text from scanned images? If yes, use Aspose.OCR for .NET, as it is the best OCR API for image analysis and text extraction from scanned photos, smartphone images, and more. Using this API, you can programmatically recognize text in images and convert it to different file formats. Furthermore, the image to text conversion API includes advanced functions such as spell-checking and character replacement for visually defective texts. It could easily read such texts, check the spelling, and replace any distorted characters from the misspelled text on the image. While running image OCR, you can provide the link to an image file as a source. It is possible to scan and recognize text from a complete image or only a select part of the image for this process. Proficiently develop full-featured image to text converter apps using the .NET image OCR API and easily convert JPEG to text, PNG to text, BMP to text, and more.


1. How can I convert images to text in .NET?

Converting images to text in .NET is quick and easy using the .NET OCR API. Only a few lines of .NET coding are needed to convert JPG, BMP, GIF, PNG, TIFF, and other image files to PDF, Word, Excel, JSON, Plain Text, and XML formats.

2. How long it takes to convert image or PDF files to text?

The best OCR API for .NET works fast and completes your text recognition, extraction, and conversion requests in no time.

3. Is it safe to process scanned images and PDFs using the .NET API?

You can be sure of the security of your data files while processing them using the optical character recognition API for .NET. We ensure the privacy of your data and take all required measures to provide you with a secure user experience.

4. Can I process photos and PDF files on Mac OS, Windows, or Linux?

Yes, the text recognition and image to text conversion API for .NET works across different OS, frameworks, and operating environments. You can use it on the platform of your choice and it does not require any additional software installation to function.

Looking for help?

Checkout our support channels for help with your questions related to Aspose product API features and working.

Ready to get started?

Download Free Trial View All APIs