Failed to find library \"liblept172.dll\" for platform x86

538 views
Skip to first unread message

Hari.K

unread,
Jul 18, 2017, 4:32:40 AM7/18/17
to tesseract-ocr

Hi,


I have downloaded Tesseract.dll (version 3.0.2.0) and the dependant dlls - "liblept172.dll","libtesseract304.dll".


In my C# application, I've done a AddReference of Tesseract.dll. I am actually using ImageMagick for PDF bytes to TIFF conversion and then feeding the each TIFF page as an input to Tesseract for performing OCR. Now I am having a problem to load the dependant dll's (liplept172 and libtesseract304).


PixArray tiffPages = PixArray.LoadMultiPageTiffFromFile(targetFile);


At the above line I am getting the error - "Failed to find library "liblept172.dll" for platform x86"


I know when I install Tesseract from Package manager console, the dependant dll's will be placed in x64 and x86 folders and during runtime, it actually loads those 2 dll's from those folders. But given the architecture of our project, we are not supposed to install anything from NugetPackage manager. Hence I've downloaded all the 3 dll's and trying to run but could not.


Now my question is there any way to load the 2 dependant dll's from a folder of our choice instead of x64 and x86? In other words, is there any way we can programatically tell Tesseract to look for / load the above 2 dll's from some other folder of our choice instead of from x86 and x64?


Looking for some inputs here.


Thanks in Advance,
Hari

Hari.K

unread,
Jul 21, 2017, 1:25:23 AM7/21/17
to tesseract-ocr
Thanks for your time.. 

I've found an answer for the above - 

TesseractEnviornment.CustomSearchPath = Server.MapPath(@"~/somefolder"); 

Hope this might be helpful for someone else.
Reply all
Reply to author
Forward
0 new messages