OCR Processor Troubleshooting
12 Oct 20236 minutes to read
Tesseract has not been initialized exception
|Tesseract has not been initialized exception.
|The exception may occur if the tesseract binaries and tessdata files are unavailable on the provided path.
Set proper tesseract binaries and tessdata folder with all files and inner folders. The tessdata folder name is case-sensitive and should not change.
|Ensure that your data file version is 3.02 since the OCR processor is built with the Tesseract version 3.02.
Exception has been thrown by the target of an invocation
|Exception has been thrown by the target of an invocation.
|If the tesseract binaries are not in the required structure.
To resolve this exception, ensure the tesseract binaries are in the following structure.
The tessdata and tesseract binaries folder are automatically added to the bin folder of the application. The assemblies should be in the following structure.
|An exception may occur due to missing or mismatched assemblies of the Tesseract binaries and Tesseract data from the OCR processor.
|An exception may occur due to the VC++ 2015 redistributable files missing in the machine where the OCR processor takes place.
Install the VC++ 2015 redistributable files in your machine to overcome an exception. So, please select both file and install it.
Refer to the following screenshot:
Please find the download link Visual C++ 2015 Redistributable file,
Visual C++ 2015 Redistributable file
Can’t be opened because the developer’s identity cannot be confirmed
|Can't be opened because the developer's identity cannot be confirmed.
|This error may occur during the initial loading of the OCR processor in Mac environments.
|To resolve this issue, refer this link for more details.
The OCR processor doesn’t process languages other than English
|The OCR processor doesn't process languages other than English.
|This issue may occur if the input image has other languages. The language and tessdata are unavailable for those languages.
The essential PDF supports all the languages the Tesseract engine supports in the OCR processor.
The dictionary packs for the languages can be downloaded from the following online location:
It is also mandatory to change the corresponding language code in the OCRProcessor.Settings.Language property.
For example, to perform the optical character recognition in German, the property should be set as
"processor.Settings.Language = "deu";"
Text does not recognize properly when performing OCR on a PDF document with low-quality images
|Text does not recognize properly when performing OCR on a PDF document with low-quality images
|The presence of low quality images in the input PDF document may be the cause of this issue.
By using the best tessdata, we can improve the OCR results. For more information,
please refer to the links below.
Note:For better performance, kindly use the fast tessdata which is mentioned in below link,
OCR not working on Mac: Exception has been thrown by the target of an invocation
|Syncfusion.Pdf.PdfException: Exception has been thrown by the target of an invocation" in the Mac machine.
|The problem occurs due to a mismatch in the dependency package versions on your Mac machine.
|To resolve this problem, you should install and utilize Tesseract 5 on your Mac machine. Refer to the following steps for installing Tesseract 5 and integrating it into an OCR processing workflow.
1.Execute the following command to install Tesserat 5.
If the "brew" is not installed on your machine, you can install it using the following command.
2.Once Tesseract 5 is successfully installed, you can configure the path to the latest binaries by copying the location of the Tesseract folder and setting it as the Tesseract binaries path when setting up the OCR processor. Refer to the example code below:
3.Add the TessDataPath from bin folder. Refer to the example code below:
Method PerformOCR() causes problems and ignores the tesseract files under WSL.
|Method PerformOCR() causes problem and ignores the tesseract files under WSL
|Tesseract binaries in WSL are missing.
|To resolve this problem, you should install and utilize Leptonica and Tesseract on your machine. Refer to the following steps for installing Leptonica and Tesseract,
1. Install the leptonica.
2.Install the tesseract.
3. Copy the binaries (liblept.so and libtesseract.so) to the missing files exception folder in the project location.