views:

36

answers:

3

Hi there.

I'm making an application that your typical CRUD scenario. I also need to scan a document and save that image to disc.

I don't really need complex image manipulation, just a simple "call scanner to scan, catch the scanned image" approach.

What's the easiest way to accomplish this on a Windows Form .NET 3.5 c# application?

Thanks.

A: 

If your scanner supports TWAIN, it's the best way to go.


A .Net article on using TWAIN:

http://www.codeproject.com/KB/dotnet/twaindotnet.aspx

This spawned an open source project:

http://code.google.com/p/twaindotnet/


Twain.Net also looks useful:

http://twainnet.cvs.sourceforge.net/viewvc/twainnet/Twain.NET/

codekaizen
That link is from 2002, maybe there's an easier more managed way of using a scanner without COM interop?
Serg
I doubt it. Perhaps WPF, or rather WIC has some way to do it, but it's not like TWAIN has changed much in 8 years, and you're going to have to handle _some_ unmanaged code somewhere to interact with it...
codekaizen
Hello, I've been told that you can use Microsoft Office to do this. Any truth to that?
Serg
It seems like you could, since Office has an API and also itself uses TWAIN to capture images. If it exposes this in the API, you can. However, this seems like the long way around...
codekaizen
Technology Without An Interesting Name, good luck :) such a pain but if your application is not complicated the sample project on codeproject is all you need.
A_Nablsi
+3  A: 

Windows has a newer api that is called Windows Image Acquisition.

http://msdn.microsoft.com/en-us/library/ms630368%28VS.85%29.aspx

http://10rem.net/blog/2010/01/08/scanning-images-in-wpf-via-wia

ZippyV
A: 

Check this StackOverflow question: C# Document Scanning

Keith Blows