Free Support Forum -

How to OCR image?

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 IDE report the error as follow,how fix it?

Error.png (11.5 KB)

Thanks for your help!



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?


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 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 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. (29.7 KB)


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.


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)
            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
        If MyOCR.ToString <> "" Then
            Dim Output As New StreamWriter(OCRResultTxtFile)
            Output.AutoFlush = True

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

End Class


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