LEADTOOLS Support
Imaging
Imaging SDK Questions
How to find whether the selected source is Scanner or not?
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, June 1, 2007 6:12:36 AM(UTC)
Groups: Registered
Posts: 11
Hi,
I am using Leadtools Raster Imaging Pro 15.
I am developing an windows application(Developed in C# & .Net 2005) in which i have to scan the images.
For scanning i am showing the list of source available using the method
TwainSession.SelectSource() method by passing empty string as parameter.
Once the user selects the source how to determine whether user selected
Scanner or not?
Regds,
Deven.
#2
Posted
:
Sunday, June 3, 2007 10:39:34 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
As you know, to select the TWAIN source to use for acquiring images, you need to call the TwainSession.SelectSource method.
Once a source is selected, the SelectedSourceName property will contain the name of that selected source.
So you need to check the SelectedSourceName property after calling the TwainSession.SelectSource method.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Sunday, June 3, 2007 11:12:35 PM(UTC)
Groups: Registered
Posts: 11
Hi,
Thank you for your reply. As you said by checking the "SelectedSourceName" property it is giving the name of the source whatever manufacturer given to it. And in my applications user will use any type of scanner from any manufacturer and there is no gaurantee that "SelectedSourceName" property will contain the word "Scanner" as a part of it. And similary i have checked one more property called "ProductFamily". This is also retruns the name given by hardware manufacturer.
So the both properties explained above are not sufficient to detect whether the source is a Scanner or not. Would you please tell me any other way which will ensure the selected source is a Scanner?
Regds,
Deven.
#4
Posted
:
Tuesday, June 5, 2007 10:54:21 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
SelectSource method displays the default Twain Select Source dialog provided by the Twain Working Group. This dialog contains the available sources (scanners TWAIN drivers) on your machine.
This means that selected source will always be a scanner (with standard twain driver).
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#5
Posted
:
Wednesday, June 6, 2007 5:23:37 AM(UTC)
Groups: Registered
Posts: 11
Hi,
I have used SelectSource method by passing empty string. It is listing all available sources like WebCam, Printer along with Scanner drivers. How can we restrict to show avilable scanner sources only?
#6
Posted
:
Saturday, June 9, 2007 11:11:15 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
SelectSource method displays the default Twain Select Source dialog provided by the Twain Working Group. This dialog contains the available sources (scanners TWAIN drivers) on your machine.
This means that selected source will always be a scanner (with standard twain driver).
Some cams and printers have twain drivers that you can use to scan.
There is no way to show the twain drivers of the scanners only. SelectSource method will show all available twain standard drivers.
However, the following post shows how to check if the device is a camera or scanner:
http://support.leadtools.com/SupportPortal/cs/forums/7612/ShowPost.aspx#7612
Thanks,
Maen Badwan
LEADTOOLS Technical Support
LEADTOOLS Support
Imaging
Imaging SDK Questions
How to find whether the selected source is Scanner or not?
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.