1

Hi i am trying to scan something in the Scanner and put it in an Image object (C#) and then pick that image and generate a PDF (to that i am using iTextSharp). So i am trying to use WIA (Windows Image Acquisition) but for what i know this only works with Devices connected in USB. (but if it's possible i prefer something that works with Devices in USB and in the Network)

Is there any better libraries or ways to do this type of things? (I tried first to work with Twain but seems to be complicated to find free libraries.)

I am working in WPF(C#) and so i need to understand how the WIA works or anything better to do this.

Thanks in advance!

skaffman
  • 398,947
  • 96
  • 818
  • 769
Miguel
  • 907
  • 4
  • 26
  • 50

1 Answers1

1

WIA doesn't care how the device is connected, that's an implementation detail of the WIA provider. You get that from the device manufacturer. Twain is grossly obsolete. I don't see a real question here, check this answer for the way to get started with WIA in a C# project.

Community
  • 1
  • 1
Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • And one last question... Can this library be used in any operating System of the Microsoft? I mean i have developing this app in Win7, but it will work in XP?? – Miguel Apr 24 '11 at 17:22
  • Versioning info is available here: http://msdn.microsoft.com/en-us/library/ms630368%28VS.85%29.aspx – Hans Passant Apr 24 '11 at 18:02
  • But there isn't any documentation or examples in c#? – Miguel Apr 24 '11 at 22:39
  • I gave you a link to C# code. The MSDN sample code is in VBScript. – Hans Passant Apr 24 '11 at 22:46
  • TWAIN is certainly still the most effective way to do document scanning on Windows, "grossly obsolete" or not. If you're wondering, call up a few document-management vendors and ask them about WIA vs TWAIN. – Spike0xff Apr 08 '13 at 15:23
  • @Spike - I can tell from your profile that you have a professional stake in Twain. That can make somebody an expert or a very non-objective source of information. It is not just a little obsolete, Microsoft has not accepted Twain data sources for scanners and cameras in the [past 13 years](http://msdn.microsoft.com/en-us/library/windows/hardware/ff548518(v=vs.85).aspx). If you have a fundamentally different experience then of course you ought to post your own answer instead of downvoting inconvenient posts. – Hans Passant Apr 08 '13 at 16:30
  • @Hans Not inconvenient, just incorrect, and I think a comment on your answer is the right place for a comment on your answer ;-) How is Microsoft's acceptance of TWAIN drivers relevant? The independent TWAIN Working Group maintains the TWAIN standard, and certifies drivers - not Microsoft. Seriously, go look at driver support for scanners by Fujitsu, Canon, Kodak, HP, Avision, Visioneer, etc. and see which ones list "TWAIN" (and how recently those drivers were updated) and which ones list "WIA". I do have a lot of TWAIN experience - 10+ years of selling my own imaging toolkit. And you? – Spike0xff Apr 16 '13 at 21:24
  • This is a C# question, that makes Microsoft's acceptance pretty relevant. Btw, looks like somebody needs your help [over here](http://stackoverflow.com/questions/16042092/recover-from-access-violation-exception) – Hans Passant Apr 17 '13 at 13:09