LEADTOOLS Support
Imaging
Imaging SDK FAQ
HOW TO: Check to see if my Scanner works with LEADTOOLS
#1
Posted
:
Wednesday, October 16, 2019 12:43:42 PM(UTC)
Groups: Registered, Manager, Tech Support, Administrators
Posts: 107
Was thanked: 9 time(s) in 9 post(s)
The following steps can be used when checking to see if your scanner works with the LEADTOOLS. This should be used as the first step for debugging conflicts associated with the TWAIN SDK.Step 1: Checking with the LEADTOOLS Demos- Download the LEADTOOLS Main SDK . We offer a free 60 day evaluation which will allow you to test your scanner with our demos: https://www.leadtools.co...loads?category=main#main
- Run the 64-bit and 32-bit TWAIN demo which you can find at the following default installation location C:\LEADTOOLS23\Shortcuts\Scanning (TWAIN & WIA)\.NET Framework Class Libraries\TWAIN
- Check to see that "Select Source" and "Acquire" are available options, and that you are able to scan using your selected source.
Pitfalls- If the "Acquire" and "Select Source" are not available options to select from, your scanner is not supported for the current architecture in the LEADTOOLS SDK. If you are running the 64-bit version, try checking with the 32-bit version to see if 32-bit works for you. Occasionally, a driver may only support one architecture. Please move on to step 2 to continue the debugging process.
Step 2: Checking with Twacker- Twacker is a tool from Twain.org which was developed through the usage of TWAIN code. In general, if a scanner works with Twacker, it should work with LEADTOOLS.
- Download the correct Twacker architecture based on what architecture you would like to develop in:
- Check to see that you can use your scanner when choosing "Select Source", and that you are able to scan when selecting "Acquire".
Pitfalls- If your targeted architecture did not work for both the LEADTOOLS TWAIN demo and when running the Twacker application, you will not be able to use your scanner with LEADTOOLS for that architecture. It's highly likely that the problem lies in the Twain driver you are using. You will need to contact the manufacturer of your device, or try a different scanner.
Step 3: Setting your version for 32-bit - If the TWAIN demo we provide does not work, but Twacker does, it is highly likely that the wrong TWAIN version is being used for your scanner. You will need to use the SetVersion method call to set your version to the appropriate option. If you are using the Web Scanning Framework, continue to step 3b.
- The TwainVersion Enumeration provides a list of possible versions which you can select from. You can also use GetVersion to check which version is being used in a active TWAIN session.
You can use the following code to change your version in C#
Code:TwainSession twnSession = new TwainSession();
TwainSession.SetVersion(TwainVersion.Version1); // set a version that exists
Step 3b: Setting your version for Web Scanning- Open the Leadtools.WebScanning.Host application found at this default installation location: C:\LEADTOOLS23\Examples\Scanning\DotNet\WebScanning.Host
- Navigate to the ServiceHost.cs file located in the application and add the following line of code after TwainScanningService is initialized
Code:tempScanningService = new TwainScanningService(owner);
tempScanningService.SetVersion(Twain.TwainVersion.Version1, owner);
If you are still unable to use your scanner, or your use case was not covered in this post, please email us at
support@leadtools.comEdited by user Wednesday, December 27, 2023 1:47:56 PM(UTC)
| Reason: updated
Marcus Andra
Developer Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
LEADTOOLS Support
Imaging
Imaging SDK FAQ
HOW TO: Check to see if my Scanner works with LEADTOOLS
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.