Forum Replies Created
- AuthorPosts
The TWAIN capability for this is ICAP_AUTOMATICLENGTHDETECTION. You can also experiment with ICAP_AUTOMATICBORDERDETECTION, to see if you can get the behavior you want. Ultimately, it’s a question of what the scanner driver supports, so if these don’t help, contact the vendor for assistance…
Locking isn’t described in the TWAIN Specification, so scanner vendors are free to implement it however they want. You need to contact the vendor to see what your options are…
Sorry, there wasn’t much info to go on in the message, it finally occurred to me that this might be a question about TWAIN C#. If still interested, the code and the DSM can be used to produce logs to analyze what’s happening. However, in most cases one needs to go right to the scanner vendor for answers…
If the code is trying to use TWAIN_32.DLL for the DSM it will fail, because one can’t load a 32-bit DLL into a 64-bit process. The TWAIN Working Group releases 32 and 64 bit DSM’s (open source). They can be found here:
http://sourceforge.net/projects/twain-dsm/August 4, 2015 at 2:20 pm in reply to: Canon Scanner: Disable thumbnail view when scanning film #26304You need to contact the Canon for information about their products. Presumably you’ve already made sure you’re running with the latest version of their driver. Sadly, there’s nothing the TWAIN Working Group to help when it comes to the specific behavior of a scanner vendor’s proprietary driver…
I believe that ObjectTWAIN is another option. Unfortunately, I’m not aware of any sustained open source effort to support Java. My own efforts have been devoted to C#, and I can testify that doing this sort of thing right is non-trivial…
There are relatively few native 64-bit TWAIN drivers. So x64 and AnyCPU builds of C# applications can find themselves unable to find a useable scanner. You need to make sure that your application has some component built for x86, which may involve running that component in a separate process…
C# can be used for driver, but an ANSI-C entry point called DS_Entry() must be exposed by the .ds file so that the data source manager can connect and communication with the driver.
http://sourceforge.net/projects/twain-samples/
This is a code written in C++, which includes a sample application and data source. Building off of this code will reduce your development time.TWAIN on C# is meant for applications, but the TWAINH.CS and possibly the TWAIN.CS modules could be used to help with or to better understand how to develop a TWAIN driver.
Check out the TWAIN Sample Application to see if that helps.
http://sourceforge.net/projects/twain-samples/The driver’s user interface is turned off by specifying a value of 0 for ShowUI on DAT_USERINTERFACE…
April 28, 2015 at 4:00 pm in reply to: Inability to compile with twain.h in Visual Studio 2013 #26267I downloaded the TWAIN Data Source Manager (DSM) from http://sourceforge.net/projects/twain-dsm/files/TWAIN%20DSM%202%20Source/ and converted the VS2010 solution to VS2013, and (after making a code tweak unrelated to TWAIN.H) I successfully built the DSM.
That suggests that TWAIN.H is okay, which suggests that there’s a conflict with some other part of the environment it’s being built within. For instance, if some include file redefine some macro, that could cause a problem.
If you turn on full output from the VS compiler, it ought to give you enough information to find the problem. The only macro that I can see being a candidate for a problem is PASCAL which is used to define TW_CALLINGSTYLE, and resolved to __stdcall. You might trying doing an #undef PASCAL before #include
to see if that lets the code compile, but by itself that won’t qualify as a fix, it’ll just help you identify the problem. There are a few projects out there that interface C# to TWAIN. I recommend checking out TWAIN CS (http://sourceforge.net/projects/twainforcsharp/) to see if that gives you what you need…
Howdy…
First off, if you could contact Kodak Alaris Support, that will make any effort to help you official…
http://graphics.kodak.com/DocImaging/US/en/Business_Services/Scanner_Support/index.htmSecond, I’d like to see logs from the Kodak scanner. To do that, please follow these steps…
– make sure you have the latest driver installed
http://graphics.kodak.com/DocImaging/US/en/Products/Document_Scanners/i2600_Scanner/Support/Drivers_And_Downloads/i2000_Plus_Series_Scanner_Drivers_Windows_Linux/index.htm– make sure your scanner is turned off
– delete c:programdatakds_kodakkds_i2000twainlog.*
– edit c:programdatakds_kodakkds_i2000twainconst.ini
– set debug=1, so that the file contains these lines…
[dsidentity]
debug=1
logbackup=-1– turn your scanner on and recreate the problem
– turn the scanner off
– zip up the contents of the c:programdatakds_kodakkds_i2000 folder, and attach that file to this thread
– edit the const.ini file and put a semi-colon (;) in front of the debug and the logbackup lines to disable them
If you’re running on Linux, the path is /var/kodak/kds_i2000/twain, otherwise all the same steps apply
— Mark
The TWAIN Working Group maintains open source sample code (BSD license) for both TWAIN applications and TWAIN drivers (data sources) at the following location:
http://sourceforge.net/projects/twain-samples/The sample driver simulates a scanner, generating its own images. You should be able to find the functions where it does this and insert the calls to your device’s API in roughly the same place.
The TWAIN Specification fully details all of the things that a driver needs to do:
http://twain.org/scannerdriverdevelopers/specification-and-tools.htmlAs for writing the driver in C#, that’s unusual, but not impossible to do. The Data Source Manager looks for a C-style entry point named DS_Entry (the definition is in the Spec and the TWAIN.H file). Once you get past that you can use whatever language you want. However, the sample code is written in C++, so you’ll have a fair amount of work moving all of that code to C#.
You can get a bit of help from this open source project:
http://sourceforge.net/projects/twainforcsharp/This code shows how to write applications for TWAIN using C#, and includes a complete TWAINH.CS file, that matches all of the content of the TWAIN 2.3 TWAIN.H file put out by the TWAIN Working Group. I’m not sure how well it will apply to development work on the driver side, but it’s a start.
Myself, I would stick with the C++ code, because then bug fixes and new functionality put out by the TWAIN Working Group will be easy to adopt. But that’s just my opinion… 🙂
Make sure that your project is set to create x86 binaries. C# usually outputs AnyCPU by default, which will result in a 64-bit binary image on a 64-bit OS (and a 32-bit on a 32-bit OS). Most TWAIN drivers are still 32-bit…
We’re starting work on TWAIN 2.4, so we’ll see if we can come up with an agreeable way of doing this…
- AuthorPosts