To run this demo you need the csXImage trial ocx control installed on your system as well as MS Internet Explorer. The trial control and the example file are available below:
The ActiveX control csXImage includes a range of functions to acquire images from TWAIN compliant devices such as scanners and webcams. It can be used with a scanner that has an Automatic Document Feeder (ADF).
The scanned images are saved to file on the local disk. Three radio buttons are provided for the user to select the method for file saving. Each option demonstrates a different way of handling the multiple images being received by the control. The status of the radio buttons is checked in the function 'csxiacquire' that is called by the OnAcquire event and used to call the appropriate code.
The first option is for the images to be saved as individual files. A variable (filenum) is used as a counter and the images are saved as demo1.tif, demo2.tif, etc.
The second option adds each image to a multi-page TIFF file using the AddToTIF function. When scanning is finished this file is saved.
The third option makes use of the IsBlank property of the control to detect blank pages. Each group of images separated by blank pages is saved as a multi-page TIFF file. The AddToTIF function is used and the counter filenum is again used to increment the file number.
Checkboxes are provided so that the user can select whether or not duplex scanning should be enabled and whether or not the user interface of the scanner should be used. If the interface is not used, the scanning will proceed using default settings for colour depth, resolution etc.
A longer description of this demo is provided in the ReadMe.txt file included in the download.
© Chestysoft, 2017.