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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

"Tesseract engine has not been initialized"

Thread ID:

Created:

Updated:

Platform:

Replies:

128497 Jan 25,2017 05:41 PM UTC Feb 21,2017 09:06 AM UTC ASP.NET MVC 5
loading
Tags: PDF
Peter
Asked On January 25, 2017 05:41 PM UTC

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 ?

Sasi Kumar Sekar [Syncfusion]
Replied On 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. 


Peter
Replied On 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

Sasi Kumar Sekar [Syncfusion]
Replied On 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. 


Ioan Flaviu
Replied On 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

Sasi Kumar Sekar [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;