Getting error with PDF using Aspose.OCR

Getting error when using the following function:

AsposeOcr.RecognizeImage passing in bitmap stream and rectangle area. (Document attached)

TestObject_Page1.pdf (1.4 MB)

Error:
Unable to process file.Object reference not set to an instance of an object.

Aspose.OCR Version 22.2.0

@ngoel78
We are looking into it and will be sharing our feedback with you shortly.

@ngoel78

Can you please try using the latest version of the API i.e. 24.3. We tested using it and did not face any exception:

Aspose.OCR.AsposeOcr api = new Aspose.OCR.AsposeOcr();

Aspose.OCR.OcrInput ocrInputPdf = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.PDF);
ocrInputPdf.Add(dataDir + "TestObject_Page1.pdf");
List<Aspose.OCR.RecognitionResult> resultPdf = api.Recognize(ocrInputPdf, new Aspose.OCR.RecognitionSettings { DetectAreasMode = OCR.DetectAreasMode.DOCUMENT });
Aspose.OCR.AsposeOcr.SaveMultipageDocument(dataDir + "searchablePdf.pdf", Aspose.OCR.SaveFormat.Pdf, resultPdf);

searchablePdf.pdf (230.9 KB)