VS2005 (VB.net2.0) - Tesseract-ocr

Hello Experts!
OK, so I need some help with this one...as I can not figure it out on my own.

I want to use the FREE tesseract-ocr (https://code.google.com/p/tesseract-ocr/)
However I need to use it in Visual Studio 2005 - VB.net, and I can not for the life of me figure it out.

I've tried adding the dll I got from this site (https://code.msdn.microsoft.com/windowsdesktop/How-to-use-Tessnet2-library-716be12f) and tried following the sample code provided but I can'get it it to work I keep getting errors.

Any ideas / sample code that works with VS2005?

Thanks,
Mark
smithmrkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MlandaTCommented:
Have you looked at the .NET wrapper for Tesseract (https://github.com/charlesw/tesseract also available on Nuget https://www.nuget.org/packages/Tesseract/)

Perhaps also prividing some insights into the sorts of errors you refer to would also help. Though I would suggest the Nuget option first.
0
smithmrkAuthor Commented:
Both of these solutions require higher versions of Visual Studio which is why I put in my subject line I needed a solution for Visual Studio 2005 or .net 2.0.

Here is one of the error messages I'm getting using the DLL I downloaded from this site (https://code.msdn.microsoft.com/windowsdesktop/How-to-use-Tessnet2-library-716be12f)

See attached screen shot.

Mark
error.PNG
0
MlandaTCommented:
BadImageFormatException suggests an issue of processor architecture... 32bit vs 64bit. Is your application targetting 64bit? If so... use 32bit? Otherwise... use 64bit?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

smithmrkAuthor Commented:
OK, I've gotten past that error...I needed to switch the target CPU to 86x.

Now I'm getting this error when I hit this part of the code:
ocr.Init("C:\Test\tessdata", "eng", False)

See attached Screen Shot.
Do we know if tessnet2_32.dll will work with Visual Studio 2005?

Mark
error.jpg
0
MlandaTCommented:
That just means you cannot step into that code... so it's not really an error per ce.

Unfortunately, I no longer have a VS2005 installed on my machine to test too. If it's not a problem, there is also the free VS2015 Community Edition (well... free for small teams and individuals etc...)
0
MlandaTCommented:
But I supposed the most important thing is whether things work without the breakpoint or not? (Or if you do a F10 as opposed to a F11 on that line)
0
smithmrkAuthor Commented:
It doesn't work at all...if I don't have a breakpoint it still stops and throws that error on that line of code.

I'm beginning to think I doesn't work with VS2005...everything I have found on the Web references VS2008 or higher...so I think I'm out of luck trying to get it to work with VS2005.

Mark
0
smithmrkAuthor Commented:
I was never able to get it to work with VS2005, but I was able to get it to work with VS2013...so I found a way I can use VS2013 and put the results into a database and then use VS2005 for the results.

Mark
0
MlandaTCommented:
Why not just everything then on VS 2013?

Nonetheless, glad you found a method that works for your application. All the best with the rest of it
0
smithmrkAuthor Commented:
Because my web sites still use .net 2.0 because the server they are on is still windows 2003 IIS 6.0, our company still uses IE 8...slowing upgrading.

$$$$ You know!

Mark
0
MlandaTCommented:
I know. But even with VS2013, you can still target .NET 2.0 :)

IE8!!! I don't envy you man! Lol. Cheers
0
smithmrkAuthor Commented:
Yes, I know and I have tried a couple of times...but it is a pain in the butt because there are too many things in the Web Config to update and some of my AJAX Stuff give me fits between the versions.

I'm just going to wait until we get off IE8 and Windows Server 2003.

Mark
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.