Hi
Currently i am evaluate Aspose.OCR.dll with temporary license , i am try to ocr file,but nothing happen,pls send sample code,Below is my code which i tried.
'Create an instance of Document to load the PDF
Dim pdfDocument = New Aspose.Pdf.Document(“C:\Users\Aravind\Desktop\New folder\NOOCR.pdf”)
Dim wordLicense As Aspose.OCR.License = New Aspose.OCR.License()
wordLicense.SetLicense(“C:\Users\Aravind\Desktop\New folder\Aspose.OCR.lic”)
'Create an instance of OcrEngine for recognition
Dim ocrEngine = New Aspose.OCR.OcrEngine()
'Iterate over the pages of PDF
For pageCount As Integer = 1 To pdfDocument.Pages.Count
'Creating a MemoryStream to hold the image temporarily
Using imageStream = New System.IO.MemoryStream()
'Create Resolution object with DPI value
Dim resolution = New Aspose.Pdf.Devices.Resolution(300)
'Create JPEG device with specified attributes (Width, Height, Resolution, Quality)
'where Quality [0-100], 100 is Maximum
Dim jpegDevice = New Aspose.Pdf.Devices.JpegDevice(resolution, 100)
'Convert a particular page and save the image to stream
jpegDevice.Process(pdfDocument.Pages(pageCount), imageStream)
imageStream.Position = 0
'Set Image property of OcrEngine to the stream obtained from previous step
ocrEngine.Image = Aspose.OCR.ImageStream.FromStream(imageStream, Aspose.OCR.ImageStreamFormat.Jpg)
'Perform OCR operation on one page at a time
If ocrEngine.Process() Then
Console.WriteLine(ocrEngine.Text)
End If
End Using