Hello
i am trying to use syncfusion ocr with tesseract. I have the following error
using (OCRProcessor processor = new OCRProcessor(@"../../Tesseract Binaries/"))
{
//processor.Settings.TempFolder = @"C:\Temp\TesseractWork\";
//Load a PDF document
PdfLoadedDocument lDoc = new PdfLoadedDocument("../../Data/input.pdf");
//Set OCR language to process
processor.Settings.Language = Languages.English;
//Process OCR by providing the PDF document and Tesseract data
output.Text = processor.PerformOCR(lDoc, @"../../Tessdata/");
//Save the OCR processed PDF document in the disk
lDoc.Close(true);
}
System.Exception
HResult = 0x80131500
Message = Unhandled Exception: System.Reflection.TargetInvocationException: Exception thrown by the target of a call. ---> System.AccessViolationException: Attempt to read or write protected memory. Often this condition indicates that other parts of the memory are corrupted.
in Syncfusion.OCRProcessor.Native.OCRApi.InitializeDataPath (IntPtr pt, String path, String lang)
in Syncfusion.OCRProcessor.OCRProcessor.DoOCR (String [] args)
--- End of inner exception stack trace ---
in System.RuntimeMethodHandle.InvokeMethod (Object target, Object [] arguments, Signature sig, Boolean constructor)
in System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal (Object obj, Object [] parameters, Object [] arguments)
in System.Reflection.RuntimeMethodInfo.Invoke (Object obj, BindingFlags invokeAttr, Binder binder, Object [] parameters, CultureInfo culture)
in Program.Main (String [] args)
Source = Syncfusion.OCRProcessor.Base
Stack Trace:
in Syncfusion.OCRProcessor.OCRProcessor.GetHOCR (String imagePath, String dataPath)
in Syncfusion.OCRProcessor.OCRProcessor.PerformOCR (PdfLoadedDocument lDoc, Int32 startIndex, Int32 endIndex, String dataPath)
in Syncfusion.OCRProcessor.OCRProcessor.PerformOCR (PdfLoadedDocument lDoc, String dataPath)
in aiprivacy_fron.Editor.ASPxCallbackPaneTuttemieprenot_Callback (Object sender, CallbackEventArgsBase e) in C: \ MapWindow4Dev \ SUDE \ 00_SVN_PAESIT \ AI_privacy \ Potenzainlove \ Potenzainlove \ Editor.asp4.cs: line 49
in DevExpress.Web.ASPxCallbackPanel.OnCallback (CallbackEventArgsBase e)
in DevExpress.Web.ASPxCallbackPanel.RaiseCallbackEvent (String eventArgument)
in DevExpress.Web.ASPxWebControl.System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent (String eventArgument)