Bulgarian 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 Bulgarian.

It is an advanced fork of Tesseract, built exclusively for the .NET developers and regularly outperforms other Tesseract engines for both speed and accuracy.

Contents of IronOcr.Languages.Bulgarian

This package contains 52 OCR languages for .NET:

  • Bulgarian
  • BulgarianBest
  • BulgarianFast

Download

Bulgarian Language Pack [български език]

Installation

The first thing we have to do is install our Bulgarian OCR package to your .NET project.

Install-Package IronOCR.Languages.Bulgarian

Code Example

This C# code example reads Bulgarian text from an image or PDF document.

// Ensure you have installed the IronOCR language package for Bulgarian
// PM> Install-Package IronOcr.Languages.Bulgarian

using IronOcr;

var Ocr = new IronTesseract();

// Set the OCR language to Bulgarian
Ocr.Language = OcrLanguage.Bulgarian;

// Load the image or PDF document containing Bulgarian text
using (var Input = new OcrInput(@"images\Bulgarian.png"))
{
    // Perform OCR and obtain the result
    var Result = Ocr.Read(Input);

    // Extract all the text from the OCR result
    var AllText = Result.Text;

    // Optionally, print or use the extracted text as needed
    Console.WriteLine(AllText);
}
// Ensure you have installed the IronOCR language package for Bulgarian
// PM> Install-Package IronOcr.Languages.Bulgarian

using IronOcr;

var Ocr = new IronTesseract();

// Set the OCR language to Bulgarian
Ocr.Language = OcrLanguage.Bulgarian;

// Load the image or PDF document containing Bulgarian text
using (var Input = new OcrInput(@"images\Bulgarian.png"))
{
    // Perform OCR and obtain the result
    var Result = Ocr.Read(Input);

    // Extract all the text from the OCR result
    var AllText = Result.Text;

    // Optionally, print or use the extracted text as needed
    Console.WriteLine(AllText);
}
' Ensure you have installed the IronOCR language package for Bulgarian
' PM> Install-Package IronOcr.Languages.Bulgarian

Imports IronOcr

Private Ocr = New IronTesseract()

' Set the OCR language to Bulgarian
Ocr.Language = OcrLanguage.Bulgarian

' Load the image or PDF document containing Bulgarian text
Using Input = New OcrInput("images\Bulgarian.png")
	' Perform OCR and obtain the result
	Dim Result = Ocr.Read(Input)

	' Extract all the text from the OCR result
	Dim AllText = Result.Text

	' Optionally, print or use the extracted text as needed
	Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel

In this example:

  • We create an IronTesseract object to perform the OCR operations.
  • We set the language for OCR to Bulgarian using OcrLanguage.Bulgarian.
  • We load an image file Bulgarian.png into an OcrInput object.
  • We use Ocr.Read(Input) to extract text from the image.
  • Finally, the extracted text is accessed using Result.Text.