Scanning from the ADF using WIA in C#

Updated on Wednesday, June 2, 2021

Comments Page 3

Return to post.

Comments

Rob Ellison
Rob Ellison

Aurelio, _adf in the above snippet is set by the use - true to use the feeder, false to use the flat bed. It then sets the appropriate mode.

To see if the scanner has a flat bed check the WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES property (http://msdn.microsoft.com/en-u....

Aurelio

How do you determine the value of the "_adf" variable? I need to detect if the scanner has a flatbed, but I can't figure out how to do it.

Thanks,

Aurelio

Rob Ellison

Hugh - very nice! Thanks for sharing that.

Hugh

(grin) Thanks Rob. I've been reading a bunch about WIA the last couple days and I just went ahead and implemented those yesterday afternoon as Extension methods on the Properties object and also another helpful one on the COMException object. Check 'em out:

Rob Ellison

Here are the methods to drop in:

Hugh

Can you post the full code? I can't resolve SetItemIntProperty or SetDeviceIntProperty.

Thanks,
Hugh

Add Comment

All comments are moderated. Your email address is used to display a Gravatar and optionally for notification of new comments and to sign up for the newsletter.