Can one listen a twain (Maybe WIA) scanner?

一个人想着一个人 提交于 2019-12-05 10:11:02

I have only worked with the native interfaces to TWAIN and WIA, so I can't vouch for these other layers on top of them. However, with regards to TWAIN, some mechanisms do exist that allow an application to be notified to capture data. I believe this is handled with STI.dll, an older library that is available on Windows 2000+. Look up StiCreateInstance for more info.

If you choose to go the WIA route, it is much simpler. You can register to recieve events, such as a 'scan' button or 'image created' event. Then all you need to do is handle those events to get the image. The toughest part of that is finding hardware that implements the features you want.

Microsoft has a WIA automation library that makes many of these tasks much simpler. It can be used by scripting languages.

We've recently incorporated TWAIN into one of our apps. We looked at WIA but in the end TWAIN is much more flexible and can connect to apps such as VRS (Virtual ReScan). In the end it's 'pull', you request a scan and then wait for the scanner. One of the nice things with VRS is that it's software between our TWAIN calls and the device, as such, it takes care of a few things, one of which is it will can wait, virtually forever, for paper to be placed in the hopper for scanning. This allows the ability to 'start' a scan job and then wait for the paper, it also allows for additional pages to be added to the unit.

If you are looking for something a little more 'push' oriented then look to a scanner or MFP that supports ftp/smb/email etc. and let it scan and you can simply monitor a folder or POP3 mailbox for the job.

You can also look to MFP devices that include (sometimes at additional cost) tools to help such as Xerox's Template, Lexmark's LDSS, HP's DSS.

Here is a link to the .NET TWAIN code we based our scanner integration with: http://www.codeproject.com/KB/dotnet/twaindotnet.aspx

[edit - if it was me, I'd look at adzm's answer ;-p]

As I understand it, regular TWAIN is a "pull", not a "push" from the scanner. I could well be wrong...

I expect such interfaces do exist for high end, high volume scanners (you know, the ones the size of a billiard table) - but not (AFAIK) for regular consumer scanners.

For use with .NET (and before that, COM), I've always managed with ImageMan.

It is possible to have the scanner tell your app that there is a scanned image. I am not familiar with VintaSoft .net control and Atalasoft DotTwain Image Capture, but with some twain sdks, there is OnPostTransfer/OnPostAllTransfer event which is triggered after each scanning so that you can "notify" your winservice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!