French OCR in C# and .NET
Other versions of this document:
IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including French.
It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines for both speed and accuracy.
Contents of IronOcr.Languages.French
This package contains 43 OCR languages for .NET:
- French
- FrenchBest
- FrenchFast
Download
French Language Pack [français]
Installation
The first thing we have to do is install our French OCR package to your .NET project.
Install-Package IronOCR.Languages.French
Code Example
This C# code example reads French text from an image or PDF document.
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of IronTesseract, which is the OCR engine
var Ocr = new IronTesseract();
// Specify the language to French for OCR processing
Ocr.Language = OcrLanguage.French;
// Load the input image or PDF document
using (var Input = new OcrInput(@"images\French.png"))
{
// Perform OCR and retrieve the result
var Result = Ocr.Read(Input);
// Access the text from the OCR result
var AllText = Result.Text;
// Output or further process `AllText` as needed
}
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of IronTesseract, which is the OCR engine
var Ocr = new IronTesseract();
// Specify the language to French for OCR processing
Ocr.Language = OcrLanguage.French;
// Load the input image or PDF document
using (var Input = new OcrInput(@"images\French.png"))
{
// Perform OCR and retrieve the result
var Result = Ocr.Read(Input);
// Access the text from the OCR result
var AllText = Result.Text;
// Output or further process `AllText` as needed
}
' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of IronTesseract, which is the OCR engine
Private Ocr = New IronTesseract()
' Specify the language to French for OCR processing
Ocr.Language = OcrLanguage.French
' Load the input image or PDF document
Using Input = New OcrInput("images\French.png")
' Perform OCR and retrieve the result
Dim Result = Ocr.Read(Input)
' Access the text from the OCR result
Dim AllText = Result.Text
' Output or further process `AllText` as needed
End Using