Read PDF with OCR error


#1

PDFtoXML has thrown an exception

Source: Read PDF with OCR

Message: Unable to cast object of type ‘EmptyDelegateActivity’ to type ‘System.Activities.ActivityWithResult’.

Exception Type: InvalidCastException

System.InvalidCastException: Unable to cast object of type ‘EmptyDelegateActivity’ to type ‘System.Activities.ActivityWithResult’.
at System.Activities.Runtime.FuncCompletionCallbackWrapper1.GatherOutputs(ActivityInstance completedInstance) at System.Activities.Runtime.CompletionCallbackWrapper.CreateWorkItem(ActivityInstance completedInstance, ActivityExecutor executor) at System.Activities.Runtime.CompletionBookmark.GenerateWorkItem(ActivityInstance completedInstance, ActivityExecutor executor) at System.Activities.Runtime.ActivityExecutor.ScheduleCompletionBookmark(ActivityInstance completedInstance) at System.Activities.Runtime.ActivityExecutor.ScheduleDelegate(ActivityDelegate activityDelegate, IDictionary2 inputParameters, ActivityInstance parent, LocationEnvironment executionEnvironment, CompletionBookmark completionBookmark, FaultBookmark faultBookmark)
at System.Activities.NativeActivityContext.InternalScheduleDelegate(ActivityDelegate activityDelegate, IDictionary2 inputParameters, CompletionBookmark completionBookmark, FaultBookmark faultBookmark) at System.Activities.NativeActivityContext.ScheduleFunc[T,TResult](ActivityFunc2 activityFunc, T argument, CompletionCallback`1 onCompleted, FaultCallback onFaulted)
at UiPath.PDF.Activities.ReadOCRFileActivity.SchenduleProcessImage(NativeActivityContext context)
at UiPath.PDF.Activities.ReadOCRFileActivity.EndExecute(NativeActivityContext context, IAsyncResult result)
at UiPath.PDF.Activities.AsyncNativeActivity.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)


#2

You need to have an OCR engine within the Read PDF body


#3

What engine and language are you trying to use?
If possible, send a sample of the document you’re trying to read.