Hello,
Thanks for your reply.
Kindly note that is not included in Spire.PDF and Spire.OCR. To use it, please first search and install "Spire.PDFViewer" through Nuget.
Sincerely,
William
E-iceblue support team
Imports Spire.Pdf
Imports Spire.PdfViewer
Imports Spire.OCR
Public Class PDFExtractTextFromImages
Private Sub PDFExtractTextFromImages_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim imgPath As String = "C:\Image\1.JPG"
Dim scannedText As String = ScanTextFromImage(imgPath)
PictureBox1.Image = Image.FromFile(imgPath)
End Sub
Public Sub New()
InitializeComponent()
End Sub
Public Shared Function ScanTextFromImage(ByVal imageFilePath As String) As String
Dim ocrScanner As Spire.OCR.OcrScanner = New Spire.OCR.OcrScanner
''Scan text from the image
ocrScanner.Scan(imageFilePath)
''Get the recognized text from the OcrScanner object
Dim text As Spire.OCR.IOCRText = ocrScanner.Text
''Return the text
Return text.ToString
End Function
https://www.e-iceblue.com/Tutorials/NET/Spire.OCR-for-.NET/Program-Guide/Recognize-Text/How-to-use-Spire.OCR-in-.NET-Framework-Applications.html
Hello,
Thanks for your feedback.
I have uploaded a demo containing Spire.OCR for your reference, it can be run directly. Please download it and test it on your system and give us feedback on the test results. Thanks in advance.
Sincerely,
William
E-iceblue support team