Starting TwainSave

Top  Previous  Next

In general, to start TwainSave, please go to the directory where you installed TwainSave.  In that directory you will find a program called TwainSave.exe or TwainSave64.exe (if you are using the 64-bit version of TwainSave).

 

Alternately, you can set your PATH environment variable and add the TwainSave installation directory to the path and run TwainSave from any directory.

 

Please note:  This document refers to the TwainSave executable as "TwainSave.exe" or "twainsave.exe".  If you're using the 64-bit version of TwainSave, all references in this documentation that refers to "TwainSave.exe" applies to "TwainSave64.exe".

 

In general, to invoke TwainSave the following command line command is given:

 

twainsave [options]

 

where [options] are the various command-line options that are available.  All the command options are Unix style options (preceded with two hyphens).  For example:

 

twainsave ---filename test.tif ---noui

 

 

Very important:

 

The options are case-sensitive.  For example, an option of --p and --P are two different options.

Options that have spaces in the arguments must be enclosed in double quotes:

 Example - set the file name to c:\My Documents:

 ---filename "c:\My Documents"

 

 Example - set the area to acquire as a 3 x 3 inch square:

 --area "0 0 3 3 inch"

 
An example of a TwainSave command-line with multiple options:

 

twainsave ---filename test.bmp --filetype bmp ---nouiwait ---color 2 ---papersize A4 ---rotation 90

 

The above line acquires a file called "test.bmp" (--filename).  The file will be in the Windows BMP format (--filfetype option), a color image (--color), page size will be A4 paper size (--papersize option), and will be rotated 90 degrees clockwise (--rotation).  In addition, the user interface for the device will not be shown, and the device will wait for paper to be placed in the document feeder, scanning automatically when the paper is detected (--nouiwait)

 


The easiest way to start to use TwainSave is to start a new Command Prompt, and ensure that TwainSave.exe is available, either in the current directory or in a path specified by your operating system's PATH environment variable.  (Note that for 64-bit TWAIN devices, you must use the 64-bit version of TwainSave.exe program to access these devices).

 

Please note:  It is not recommended to start TwainSave.exe by "double-clicking" in Windows Explorer or similar application.  TwainSave is a command-line program, and it is always best to either do one of the following to run the program:

 

1) Open a command window and run the application this way.  Since TwainSave.exe writes to the command window, you may miss important information that is outputted to the command window by double-clicking or selecting from Explorer, since the command window when started from Explorer may open and close immediately.

 

2) If you're using a GUI-based command-line utility (similar to Total Commander), you can enter the TwainSave commands from the command-line using such utilities.

 

 

The example below demonstrates TwainSave when started from the command-line.

 

The following starts TwainSave and opens the TWAIN "Select Device" dialog box (this assumes that the twainsave.exe program is accessible from the C:\ directory):


c:\> twainsave --filename test.bmp

 

Once the device is selected, the device's user interface will be displayed, allowing you to start the scanning or image retrieval process.

 

clip0014

 

The number of items that appear in the "Select TWAIN device" dialog box depends on the number of installed drivers.

 

Please note that if you're running the 64-bit version of TwainSave, TwainSave64, the number of drivers that are displayed may be less than the number of drivers displayed when running the 32-bit version of TwainSave.  The reason for this is that 64-bit TwainSave will only list the 64-bit TWAIN drivers, as you cannot acquire from 32-bit devices from a 64-bit application.

 

The image retrieved will be saved in Windows bitmap (BMP) format, and the name of the file will be "test.bmp".

 

Various options are available to save to a different file format, select the device without the "Select TWAIN device" dialog from displaying, retrieving the image without displaying the device's user interface, acquiring multiple pages, etc.  It is recommended that you start with the basic set of command-line options (for example, acquire to another image type, change the file name, etc), and then add the more advanced options (for example, job control) as you get more experienced with using TwainSave.

 

If an illegal or unsupported command-line option is specified, TwainSave will present a list of the available options in the command window.