Hello
getting below error after unblocking 'Syncfusion.Compression.Base.dll' DLL.
Could not process Page '0' of file 'Input' from Property Documents Library. - Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Syncfusion.OCRProcessor.Native.OCRApi.InitializeDataPath(IntPtr pt, String path, String lang) at Syncfusion.OCRProcessor.OCRProcessor.DoOCR(String[] args) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Program.Main(String[] args)
Please help
Hi Seema,
Thank you for reaching out to Syncfusion support.
We use Google's Tesseract engine internally to recognize text from scanned PDF documents and images. This engine relies on the Tesseract and Leptonica binaries to process images and extract text, using trained data files (.traineddata) for accurate recognition. These binaries are included in the runtimes/win-x64/native directory, and the trained data files are located in runtimes/tessdata/.
The issue you reported typically occurs when the Tesseract binaries are either missing or the path to them is incorrect. To resolve this, please ensure that the binaries are present in the correct location and that the path is properly configured.
Additionally, if the binaries do not have sufficient read, write, and execute permissions, this issue may also occur. We kindly request you to ensure that the required permissions are granted for these binaries.
We have included the necessary binaries in the NuGet package itself. When you install the package and build your application, the binaries are automatically copied to the project directory, and the paths are configured accordingly. For your reference, we have attached a sample project.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/OCR_Framework_Application
If you are still experiencing issues, we recommend manually specifying the paths for both the Tesseract binaries and the tessdata folder. If the problem persists, please share the following details with us so we can replicate the issue on our end:
We’ll be happy to assist you further.
Regards,
Karmegam