Search code examples
c#scanningepsontwain

Scan using the EPSON Scan "Professional Mode" settings without showing UI


I'm using NTwain to interface with an Epson scanner programmatically and it works well for enabling and transferring images, as well as setting some scan settings.

However, I want to be able to set different "profiles" using Epson Scan in Professional Mode, then recall them programmatically in my application. I can browse the registry and find where all these settings live, but I don't know how to get the scanner to use them without starting the scan from the Epson Scan application. Is this even possible? Or is there a way to map the settings to twain settings? I noticed epson lists a CAP_CUSTOMDSDATA capability but this is unfortunately not supported with my scanner.

enter image description here enter image description here


Solution

  • After discussing with Epson Scan technical support, it seems like this is not possible without custom firmware. The only way to implement some of the settings provided by Epson Scan is by using the application itself.

    The workaround for me was to set the appropriate registry values (located at SOFTWARE\Epson\EPSON Scan\ES00FE\Professional) and then opening epson scan (via _twain.CurrentSource.Enable(SourceEnableMode.ShowUI)) and clicking the scan button through the application. A bit hacky but it works.