Swedish 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 Swedish.
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.Swedish
This package contains 46 OCR languages for .NET:
- Swedish
- SwedishBest
- SwedishFast
Download
Swedish Language Pack [Svenska]
Installation
The first thing we have to do is install our Swedish OCR package into your .NET project.
Install-Package IronOCR.Languages.Swedish
Code Example
This C# code example reads Swedish text from an image or PDF document.
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Swedish
Ocr.Language = OcrLanguage.Swedish;
// Load the image file or PDF from which the text will be extracted
using (var Input = new OcrInput(@"images\Swedish.png"))
{
// Read the text from the input using the OCR engine
var Result = Ocr.Read(Input);
// Get all the extracted text as a string
var AllText = Result.Text;
}
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Swedish
Ocr.Language = OcrLanguage.Swedish;
// Load the image file or PDF from which the text will be extracted
using (var Input = new OcrInput(@"images\Swedish.png"))
{
// Read the text from the input using the OCR engine
var Result = Ocr.Read(Input);
// Get all the extracted text as a string
var AllText = Result.Text;
}
' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of the IronTesseract OCR engine
Private Ocr = New IronTesseract()
' Set the language to Swedish
Ocr.Language = OcrLanguage.Swedish
' Load the image file or PDF from which the text will be extracted
Using Input = New OcrInput("images\Swedish.png")
' Read the text from the input using the OCR engine
Dim Result = Ocr.Read(Input)
' Get all the extracted text as a string
Dim AllText = Result.Text
End Using