I am using IronOCR to extract the content from a scanned image and trying to read the data as per need but I am unable to do so.
I am expecting the results to be
Name Of Student : HELLOUSER
Aadhar : 123456789
and other information as per need, I tried the following code but no luck
var ocr = new IronTesseract();
using (var ocrInput = new OcrInput())
{
ocrInput.LoadImage(@"C:\Tools\stud.png");
var ocrResult = ocr.Read(ocrInput);
string[] lines = ocrResult.Text.Split('\n');
foreach (string line in lines)
{
if (line.Contains(":"))
{
var parts = line.Split(':');
Console.WriteLine($"Key: {parts[0]}, Value: {parts[1]}");
}
}
}