40

Is there any free or commercial component written in .NET (no COM interop) that will work with most twain scanners?

Lou Franco
  • 83,503
  • 14
  • 127
  • 183
Erick Sgarbi
  • 1,212
  • 1
  • 11
  • 17

10 Answers10

26

TwainDotNet

I've just wrapped up the code from Thomas Scheidegger's article (CodeProject: .NET TWAIN image scanning) into a Google code project: http://code.google.com/p/twaindotnet/

I've cleaned up the API a bit and added WPF support, so check it out. :)

Community
  • 1
  • 1
Luke Quinane
  • 15,732
  • 13
  • 64
  • 87
  • 1
    thanks a million! excellent project! – Yisroel M. Olewski Sep 10 '12 at 07:19
  • Can you please update the Github code? when i executed the TestApp and scanned with Brother scanner it does not scan front and rear, only was able to scan Front page but not rear page. Also when i click save the file it does not able to save anything (nor as BMP or PDF or JPEG, or PNG). Please advise. –  Jul 01 '16 at 07:38
  • When i say Use Duplex, its not scanning both side with the Github sample. But when i use manually windows scanning options from windows 10 controle panel it works to scan duplex. Can you please check this BUG? i am using Brother ADS-3000N scanner –  Jul 01 '16 at 07:43
  • http://support.brother.com/g/b/spec.aspx?c=eu_ot&lang=en&prod=ads3000n_all - this is the scanner i am testing with your WPF and all other tools. But none of your code is allowing to scan Duplex on windows 10. Can you please check what is the BUG?????? please. –  Jul 01 '16 at 07:57
10

In my company we use Pegasus. It's great.

SLaks
  • 800,742
  • 167
  • 1,811
  • 1,896
Jedi Master Spooky
  • 5,143
  • 11
  • 49
  • 85
  • 1
    I'd just like to comment that I tried out Accusoft Pegasus ImageGear .NET on this recommendation and I am very satisfied. However I would only recommend this software for business use since it can be relatively expensive. – pseudocoder Jan 22 '12 at 04:29
8

Microsoft have an API all about scanning. It's called Windows Image Acquisition and you can read a great Coding4Fun article about it by none other than Scott Hanselman here.

Jonathan Eckman
  • 1,949
  • 3
  • 22
  • 47
Matt Hamilton
  • 188,161
  • 60
  • 377
  • 317
7

+1 for Atalasoft

Technical quibble: You can avoid COM, but you can't avoid Interop: TWAIN is a native Win32 or Win64 DLL that is not part of Windows proper and is unknown to the CLR, so at the bottom, either in your code or the component you use, there are Interop calls to unmanaged code. Given what I know about TWAIN drivers, maybe I should say to very unmanaged code...

I've always had the impression that WIA was great for digital cameras, OK for consumer flatbeds, and not a serious contender for 'production scanning' - meaning something like full-speed multipage scans from a document feeder, under application control, using a USD400+ scanner. I've never heard of anybody doing production scanning through WIA, but I'd sure like to hear from somebody who's done this.

Spike0xff
  • 1,217
  • 1
  • 14
  • 23
  • We considered it but stuck with TWAIN because Fujitsu's official line is they don't support WIA in their high end scanners. – Filmund Aug 12 '09 at 10:56
  • 2
    +1. Not for AtalaSoft, but for the general comments about COM/Interop and WIA. – Dhaust Mar 15 '10 at 00:06
7

Take a look at CodeProject: .NET TWAIN image scanning That might give you a good start.

Redbaron
  • 1,028
  • 1
  • 10
  • 13
5

I found NTwain via Nuget, which satisfied me.

deerchao
  • 10,012
  • 8
  • 49
  • 59
  • where can one find examples on how to use NTwain? – stoic Feb 24 '14 at 08:31
  • 2
    There are demo projects in the source code you can get from the link above: https://bitbucket.org/soukoku/twain-in-dotnet/src/3cf2ebd90eb77a9b8337cdf059520478bb39c40a/Tests/?at=default – deerchao Feb 26 '14 at 08:58
3

The Accusoft Pegasus .NET component is called TwainPRO, and it's included in the ImagXpress SDK.

The ImageGear .NET toolkit from Accusoft Pegasus also includes a full-managed implementation of Twain.

  • 2
    since OP mentioned the word "Free", I'll add that Accusoft ImagXpress starts at $999 for the "standard" dev kit (pro kit is $2k), and then server deployment licensing per year is a hair shy of $2k for two cores. (minimum 2 cores) No perpetual licensing is available. http://www.accusoft.com/imagxpresspricing.htm – Jeremy Aug 31 '10 at 03:17
3

Disclaimer: I work for Atalasoft

Atalasoft has a product, DotTwain, which has no COM interop (just direct calls to the twain dll from .NET) and gives you a completely .NET interface. It can be embedded in a browser hosted WinForms control, for instance, because it doesn't use COM.

Lou Franco
  • 83,503
  • 14
  • 127
  • 183
  • 2
    Just to save anyone looking for a "low budget" approach, as of 8/20/10 DotTwain is $700 for the first SDK and Additional SDKs are $234. Server licensing seems to start at $400, but things get murky there on the pricing info page. http://www.atalasoft.com/products/dotimage/dottwain/pricing – Jeremy Aug 31 '10 at 03:20
  • 1
    Also, it's runtime-royalty free, which isn't true for all of the other commercial products listed for this question. – Lou Franco Aug 31 '10 at 12:15
  • Lou and his team are fantastic, I cannot recommend them enough. I found their product to be very dependable and easy to use. I am no longer in the business, but if I was, I'd be using Atalasoft. – Trey Oct 01 '18 at 20:03
1

I just saw another Scanning question that referenced a 3rd party commercial product to add to the list: ImageMan

Looks like a single developer license starts at $325. I haven't used it personally, but is one of three or four products I'm evaluating.

Community
  • 1
  • 1
Mike L
  • 4,503
  • 4
  • 33
  • 51
1

Just started a project in .net and found great info here (*dead link as of Feb 2014) about using Windows Image Acquisition. Lots of sample VB code and some c#.

Stuart Whitehouse
  • 1,311
  • 14
  • 25
Crippeoblade
  • 3,825
  • 4
  • 30
  • 28