twain ocr function returns empty byte

i have the below code:

    ddlResultFormat.Items.Add("Text")

    dynamicDotNetTwain1.LoadImage("C:\Users\elj\Desktop\3b072e9b-76b4-4776-bd3c-5984074d8ecd.png")
    Dim r = dynamicDotNetTwain1.GetImage(dynamicDotNetTwain1.CurrentImageIndexInBuffer).Width.ToString()
    Dim l = dynamicDotNetTwain1.GetImage(dynamicDotNetTwain1.CurrentImageIndexInBuffer).Height.ToString()
    Dim languageFolder As String
    languageFolder = "C:\Program Files (x86)\Dynamsoft\Dynamic .NET TWAIN 5.2 Trial\Samples\Bin\"
    Dim languages As New Dictionary(Of String, String)
    languages.Add("English", "eng")
    Me.dynamicDotNetTwain1.OCRTessDataPath = languageFolder
    Me.dynamicDotNetTwain1.OCRLanguage = "English"

    Dim ocrResultFormat As Dynamsoft.DotNet.TWAIN.OCR.ResultFormat
    ocrResultFormat = CType(System.Enum.Parse(GetType(Dynamsoft.DotNet.TWAIN.OCR.ResultFormat), Val("&H" & 0)), Dynamsoft.DotNet.TWAIN.OCR.ResultFormat)
    Me.dynamicDotNetTwain1.OCRResultFormat = ResultFormat.Text

    Dim strDllPath As String
    strDllPath = "C:\Program Files (x86)\Dynamsoft\Dynamic .NET TWAIN 5.2 Trial\Redistributable\OCRResources\"
    dynamicDotNetTwain1.OCRDllPath = strDllPath

    If (Me.dynamicDotNetTwain1.CurrentImageIndexInBuffer < 0) Then
        Dim jajajja = "Please load an image before doing OCR!"
    End If

    Dim sbytes As Byte()
    sbytes = Me.dynamicDotNetTwain1.OCR(Me.dynamicDotNetTwain1.CurrentSelectedImageIndicesInBuffer)

the problem that i'm facing is that the sbytes byte array is being always set to empty although the indice in the buffer is correct and the paths and the dll are well implemented but the convert to the byte array is not being successful i'm not getting any exception but the length of the byte is 0

any idea how can i fix this?

Answers


Please update the following line of code and try again.

Me.dynamicDotNetTwain1.OCRLanguage = "eng" 'not English

Need Your Help

Drag and drop tables

javascript jquery angularjs

I'm looking for some sort of drag and drop jquery/angular/javascript plugin from which I can add dynamic tables .

CSS Absolute-Center

css

I have a header box that spans the width of my screen. I have a slider image that goes in this section. The problem is that I need my image absolutely centered which it does not do when the screen

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.