There are 2 types of scanners:
Scanners with flat beds
Scanner with automatic document feeders
In the first case you can scan only on page at a time. You can scan to memory, to the clipboard and to a file. If you scan to memory a device independent bitmap will be generated. If you scan to a disk file, the image file format depends on the ICAP_IMAGEFILEFORMAT capability. You can get/set this capability if the scanner supports it.
If the scanner has an ADF (automatic document feeder) you can use software batch scanning. In this case you can scan papers to single page or multipage TIFF files. You can choose the compression of the file before scanning using the SetBatchScanImageCompression function/method of the BiTWAIN DLL/OCX. In this case the scanner generates a DIB in memory and the BiTwain saves the DIB to the disk as a TIFF file.
If the scanner is a high speed scanner with an ADF, use hardware batch scanning. In this case the scanner generates files according to the ICAP_IMAGEFILEFORMAT. If the image file format is a single page format, the files will be indexed (for example test00001.bmp, test00002.bmp etc). If the file format is a multipage format, such as TIFF, the scanner acquires pages to a multipage TIFF file.
[C++]
/* Acquire an image to a disk file */
#include “BiTwain.h”
/* 1. parameter: number of pages to scan It scans only one
page
2. parameter: the scans single page files or multipage
image */
SetAcquirePages(1, FALSE);
/* 1. parameter: Path and name of the file to scan */
Acquire(“C:\\Images\\Test.tif”);
[VB]
‘ Acquire an image to a disk file
‘ 1. parameter: number of pages to scan It scans only one
‘ page
‘ 2. parameter: the scans single page files or multipage
‘ image
BiTwain.SetAcquirePages 1, False
‘ Path and name of the file to scan
BiTwain.FileAcquire = “C:\Images\Test.tif”
‘ Start scanning
BiTwain.Action = TWSCAN_ACQUIRE
[C#]
/* Acquire an image to a disk file */
‘ Path and name of the file to scan
BiTwain.FileAcquire = “C:\\Images\\Test.tif”;
/* 1. parameter: number of pages to scan It scans only one
page
2. parameter: the scans single page files or multipage
image */
BiTwain.SetAcquirePages(1, false);
/* Start scanning */
BiTwain.Action =
(short)BITWAINLib.enumScanOperations.TWSCAN_ACQUIRE;