Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, June 1, 2007 6:12:36 AM(UTC)
devendranath1979

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.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, June 3, 2007 10:39:34 PM(UTC)
Maen Hasan

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)
devendranath1979

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)
Maen Hasan

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)
devendranath1979

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)
Maen Hasan

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
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.065 seconds.