wareSource.com
Registration Form Purchase Form Pay for courseware  
 


Free TWAIN Scanning Application

Description


This Journal application has been modified so that you can scan documents from your TWAIN device right into a new document! Pretty cool.

Setup

1) Unzip this file into your Notes\data directory. TWAIN.zip

2) Download eztw32.dll file to your Windows directory from http://www.dosadi.com/eztwain1.htm. This free driver was developed by Dosadi, experts in TWAIN drivers out of Washington State. The file is also attached to the About and Using documents for convenience and testing. You should, however, download the latest version from http://www.dosadi.com/eztwain3.htm or upgrade to the "pro" version of eztw32.dll that lets you do things such as scale the image (~$200).

3) Create a directory named c:\junk.

4) Open the TWAIN.NSF application.

5) Create a new Journal document.

6) Click the action button to select a TWAIN device (VERY important).

7) Then click either of the other two buttons to start the scan.

Code

The scan is launched from the Journal form. The three action buttons are shared, where you will find the code. All of the function declarations are in a script library named TWAIN.

It would be very easy to create a button in a view that launches a dialog box prompting for key fields like Subject, Keywords, Source, etc. Then run the same code but create a new UI document, copy the fields from the dialog box, and then import or paste the scanned image..

Caution: The TWAIN.NSF application is based on the Journal template, and is by default configured to inherit the design of the template. If you want to keep the twain-enabled design, you must disable template inheritance!

Issues

1) Works great with our Brother MFC-9800 multi-function scanner/fax. But with our HP scanner (our only one), the "text" scan mode resulted in a reverse color image (black background instead of white). Scanning as graphics works fine. With "text" mode, the function to acquire the image creates a DIB file (Device Independent Bitmap) file. Bring it into Paint, and it looks fine. Save it to a BMP, and it works fine. But Notes doesn't like it. When we changed the scan type to "photo", it works fine. Also you will notice that the scanned image is really huge in Notes. We are working on both issues with Dosadi (they are most helpful!) to see if it is a Notes, HP, or TWAIN bug. Or, perhaps we just didn't spend much time learning their function calls ;-) There are also other DLLs out there...Kodak makes one, and so does Olympus. They are all inexpensive (or free), and they provide VB code samples that can be easily be modified to run in Notes. We didn't try them, so in fact the problem may be a Notes bug.

2) If you are scanning to file, you will want to change the code to make sure that it doesn't overwrite any existing file. Right now, the temporary file is c:\junk\junk.bmp.

3) Right now, you must manually select a TWAIN device, or the scanning buttons cause nasty problems. You will want to add some checking for the TWAIN device before starting the scan.

Pricing

Please see restrictions on using the free extw32.dll file from Dosadi (http://www.dosadi.com).

©2003 wareSource.com

You may use this application free of charge. You cannot use it to develop a commercial product or benefit financially or otherwise from the sale of this product.


This application was developed as an educational tool and may not be complete or ready for production use. Use this application at your own risk and only after extensive testing to ensure that it is appropriate for your needs. wareSource assumes no responsibility for errors or omissions, nor for the uses made of the application and the decisions based on such use. No warrantees are made, express or implied, with regard to either the contents of this work, its merchantability, or fitness for a particular purpose. wareSource shall not be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the application. You may use the application but cannot sell the application or techniques or use the formulas in other applications. In no event shall wareSource be liable for any damages whatsoever (including without limitation, damages for loss of business profits, business interruption, loss of business information, or any other loss) arising out the use of or inability to use the application, even if they have been advised of the possibility of such damages.

The only requirement...

If you do use this application on your organization's intranet or the internet, you must include the acknowledgement of our copyright and our logo on every page of the application. Here is some example HTML code:

<a href="http://www.waresource.com"><img src="icons/waresourcedotcom.gif"></a>

<a href="http://www.waresource.com">&copy; 2000 wareSource.com</a>

Here is the logo image file: waresourcedotcom.gif


Contact Us Privacy Policy ©2010 wareSource