We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

"Tesseract engine has not been initialized"

Hi,

I get "Tesseract engine has not been initialized", I am using OCR in a c# class library.
Normally I get the the path with e.g. Server.MapPath(@"\App_Data\".
My folder lies directly under :http://pasteboard.co/qp2zK6CSl.png

I tried @"OCR\", @"\OCR\"  and @"OCR" nothing worked out.

What to do here ?

5 Replies

SK Sasi Kumar Sekar Syncfusion Team January 26, 2017 07:39 AM UTC

Hi Peter, 
 
Thank you for contacting Syncfusion support, 
 
We have created the simple sample to OCR the PDF document. The “Tesseract engine has not been initialized” exception may throw when the referring the Tessdata and TesseractBinaries folder incorrectly. We have referred mentioned folder correctly in the below sample.  
 
Please find the sample to OCR the PDF document. 
 
Please try the above sample and refer the folders correctly in your side and let us know your feedback. 
  
Regards, 
Sasi Kumar S. 



PE Peter January 26, 2017 08:20 AM UTC

This example you gave me is from a  asp.net server example ,not a class library which I use and need


SK Sasi Kumar Sekar Syncfusion Team January 27, 2017 10:03 AM UTC

Hi Peter, 
 
Thank you for your update, 
 
We have thrown the “Tesseract engine is not initialized” exception only if the given path location is missed “liblept168.dll” and “SyncfusionTesseract.dll” assemblies. So kindly provide the physical folder location to perform the OCR, in order to avoid the exception. 
  
Please try our solution and let us know your result. 
 
Regards, 
Sasi Kumar S. 



IF Ioan Flaviu February 20, 2017 01:44 PM UTC

Hy ,
Im using VB NET (2010) and try to OCR pdf document, in win form app.

But when i run the code i always get the error "Tesseract engine has not been initialized"

        'OCR
        Using processor As New OCRProcessor("TesseractBinaries\")  < What path i need to give here ? >

            Dim lDoc As New PdfLoadedDocument("H:\Documentos_Flaviu\Teste\APA.pdf")

            processor.Settings.Language = Languages.English   ' "por"  

            processor.PerformOCR(lDoc, "Tessdata\") < What path i need to give here ? >

            lDoc.Save("H:\Documentos_Flaviu\Teste\APASample.pdf")

            lDoc.Close(True)

        End Using


SK Sasi Kumar Sekar Syncfusion Team February 21, 2017 09:06 AM UTC

Hi Peter, 
 
Thank you for your update, 
 
We have created the simple Window form sample in VB 2010 to OCR the PDF document. The Tesseract is not initialized exception is throws when the given path is mismatched. 
You can find the TesseractBinaries and Tessdata folder in your machine if Essential Studio installed. 
Folder path Location: 
«Installation Location»\Syncfusion\Essential Studio<<Version Number<<Common<<Data<<PDF<<OCR» 
Example: InstallationDirectory:\Users\UserName\AppData\Local\Syncfusion\EssentialStudio\15.1.0.33\Common\Data\PDF\OCR 
 
You can download and install the Essential Studio using below location. 
Please find the Essential Studio download location: 
 
We have attached the TesseractBinaries and Tessdata folder in the attached sample. Please refer the physical folder path correctly. 
Sample :  
 
Please find the online documentation link for OCR the PDF document, it will helpful to know more about the OCR PDF. 
Online Documentation link: 
 
if you face the same error please provide issue reproducing sample, we will check and provide you the solution. 
 
Regards, 
Sasi Kumar S. 


Loader.
Live Chat Icon For mobile
Up arrow icon