How to OCR image?

Hi,support:
I have downloaded then aspose.ocr.dll version 20.6.
In my VB.Net (Net3.5) project, I added it into my reference,however, the Vb.net IDE report the error as follow,how fix it?

Error.png (11.5 KB)

Thanks for your help!
Ducaisoft

================

@ducaisoft

Aspose.OCR for .NET 20.6 version supports minimum framework version 4.6.2. Please make sure to create a project targeting the supported framework version and install the API using NuGet Package Manager. In case you face any issue, please feel free to let us know. For further information, please check “System Requirements” Section in API documentation.

Thanks for your suggestion.
My computer has installed the Net4.6, however, it still fail to use the ocr.dll.
How to fix it?

@ducaisoft

Please install 4.6.2 or 4.7 or 4.7.2 version of .NET Framework. In case it does not help, please add your console application to .zip format and share it with us. You can remove DLLs from the application in order to reduce the size. Also, please make sure to install the API using NuGet Package Manager because this way it will install all dependencies automatically.

Thanks for your suggestion, however, I still fail to work it out.
I have install Net.4.7, but the VB.net 2008 can not support Net 4.7, it only supports at most for Net3.5.
I install VS2010 and install Net 5.0, but the vs2010 only support at most for Net.4.0.
I install VS2017, but the vs2017 only support at most for Net 4.6.1.

Therefore I cannot use the ocr.dll based on VB.net 2008 and VS2010 and VS2017, as well as based on at least Net 4.6.2.

I zip the project for you, could you modify it and compile it into commandLine exe based on vs 2016 or 2017 or vs 2020 ,as well as based on at least Net4.6.2, so that I can evaluate it.

Thanks again.
YCOCRTool.zip (29.7 KB)

@ducaisoft

The archive that you have shared is corrupted and we cannot open it. However, we are preparing a sample console application in VB and will share it with you for testing.

Thanks for your response.
The archive is not corrupted, you should right-click it and then extract it here, not double-click it for extracting.

@ducaisoft

We received this error while extracting the Archive: ExtractError.png (10.6 KB)

Here is the codes in the project:

Imports Aspose.OCR
Imports System.IO

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim Cmd As String, Ops() As String
    Dim sPicFile As String
    Dim AppTitle As String
    Dim OCRResultTxtFile As String
    Cmd = Command()
    Cmd = "DCDocBatDo" & vbTab & "C:\YCOCR\YCOCRTool\YCOCRTool\TestOcr.jpg" & vbTab & "C:\YCOCR\YCOCRTool\YCOCRTool\OCR.txt"
    If Cmd <> "" Then
        If InStr(Cmd, vbTab) Then
            Ops = Cmd.Split(vbTab)
        Else
            Ops = Cmd.Split("/")
        End If
        AppTitle = Ops(0)
        sPicFile = Ops(1)
        OCRResultTxtFile = Ops(2)
        SaveSetting(AppTitle, "Default", "YCOCR", 0)
        Dim MyOCR As Aspose.OCR.AsposeOcr = New Aspose.OCR.AsposeOcr
        MyOCR.RecognizeImage(sPicFile)
        If MyOCR.ToString <> "" Then
            Dim Output As New StreamWriter(OCRResultTxtFile)
            Output.AutoFlush = True
            Output.Write(MyOCR.ToString)
            Output.Flush()
                Output.Close()
                Output.Dispose()

        End If
        SaveSetting(AppTitle, "Default", "YCOCR", 1)
    Else
        Beep()
    End If
    End
End Sub

End Class


@ducaisoft

We are working over preparing a testing application for you and will share it with you soon.