Hi
Hi
- English
- Spanish
- French
- Portuguese
Hi
Hi,
Pls send sample code in vb, here i attach sample pdf file
We have added the code to perform OCR on PDF Documents in Visual Basic .NET below.
Dim pdfDocument = New Aspose.Pdf.Document(PDF File)
Dim ocrEngine = New Aspose.OCR.OcrEngine
Dim pageCount As Integer = 1
Do While (pageCount <= pdfDocument.Pages.Count)
Dim imageStream = New System.IO.MemoryStream
Dim resolution = New Aspose.Pdf.Devices.Resolution(300)
Dim jpegDevice = New Aspose.Pdf.Devices.JpegDevice(resolution, 100)
jpegDevice.Process(pdfDocument.Pages(pageCount), imageStream)
imageStream.Position = 0
ocrEngine.Image = Aspose.OCR.ImageStream.FromStream(imageStream, Aspose.OCR.ImageStreamFormat.Jpg)
If ocrEngine.Process Then
Console.WriteLine(ocrEngine.Text)
End If
pageCount = (pageCount + 1)
Loop
We hope that this answered your question. Please feel free to reach us if additional information is required.