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?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

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.
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.

BadImageFormatException suggests an issue of processor architecture... 32bit vs 64bit. Is your application targetting 64bit? If so... use 32bit? Otherwise... use 64bit?

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
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

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?

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...)
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)
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.

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.

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
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!

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

IE8!!! I don't envy you man! Lol. Cheers
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.

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.