Issue in Reading the OCR PDF

Hi Team,

I’m using the Read PDF with OCR activity to read OCR pdf. When I have used tesseract OCR activity it won’t throw any error in execution but when I try to use the omni page OCR activity it throws below error,

RemoteException wrapping System.Exception: Error waiting for host service. Timeout: 30000
at UiPath.OCR.Contracts.Activities.OCRAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity`1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.PDF.Activities.OcrReader.ProcessAsync()
at UiPath.PDF.Activities.ReadWithOCRBase.ExecuteAsync(NativeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskNativeImplementation.BookmarkResumptionCallback(NativeActivityContext context, Object value)
at UiPath.Shared.Activities.AsyncTaskNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Kindly help me in this.

Hi @shyamala_shyamu

Might be there is a problem in connection with OCR service. Try increasing the Time out for OCR and try again.

Hope it helps!!

@mkankatala

Thanks for your quick response.Unfortunately timeout property not available for OCR Activity.Kindly assist me.

Sorry I confused… @shyamala_shyamu

Use the Retry scope activity inside the Action block insert the Get PDF with OCR activity and give the retry count 3 and try.

If it fails then it will retry untill the reaches max retry count.

@shyamala_shyamu

Did you pass any scale in omnipage ocr.after 4 it will raise an error.So keep the scale of omnipage ocr 2 to 3.

Try to change different properties like Scale and Profile in omnipage ocr and image DPI property in read pdf with ocr

@rlgandu

I didn’t pass any scale values but as per your suggestion i have set the scale value but still it’s throwing same error.

@shyamala_shyamu

Try to change the version System.Activities Package in manage packages.
Or
Use another Pdf to read the text in omnipage Ocr.whether that one also it raises any error

@rlgandu

I have tried it but it’s throwing same error.

@shyamala_shyamu

It’s better use teseract ocr for pdf extraction.in UiPath we have other ocr also like UiPath document ocr and UiPath screen ocr.

@rlgandu

Thank you for your inputs.I have tried with tesseract OCR but it does not extract the scanned image correctly so i tried with omnipage OCR.

@shyamala_shyamu

In teseract ocr try to change the Scale ,I hope by changing the scale you got your data properly.
Also change image DPi property

The Ocr’s does not extract the Data as it is in the Pdf.

1 Like

@rlgandu

I have tried with tesseract OCR and adjusted the scale to 2.Now it’s working perfectly.Thank you so much for your help…

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.