cyanfish / naps2

Scan documents to PDF and more, as simply as possible.
https://www.naps2.com
Other
2.74k stars 321 forks source link

C# - Is there any way to get the scanner name? #416

Closed Neo6400 closed 2 months ago

Neo6400 commented 2 months ago

Hello

Currently developing an application in C#, I want to know if it is possible to get the scanner name like show in the image below highlighted within the brackets with the software CaptureOnTouch (Canon).

I haven't found anything in the code to retrieve the scanner name. My scanner has been tested through USB and Ethernet in both case the name doesn't show.

IMG2

Thank you

cyanfish commented 2 months ago

If it's not part of ScanDevice.Name then there's currently no way to get it from NAPS2.

If you want you can try using NTwain (which NAPS2 uses internally) and look at the properties on the DataSource.

Neo6400 commented 2 months ago

I have tested with NTwain, I checked the datasource but the name of the scanner is nowhere to be found, I have no idea how Canon manage to get the name.

Thank you for you help