Example 15: Duplex Scanning |
Top Previous Next |
Example: Acquire images using the duplex unit.
The example below will use the duplex unit to acquire to a TIFF LZW multi-page file named FILE0000.TIF.
#include "cdtwain.h"
using namespace DTWAIN;
int main( ) { // Initialize DTWAIN - return if initialization does not work DTwainInterface TI; if ( !TI.IsValid( ) ) return 0;
// Declare a Source and assign the TWAIN source to it DTwainSource Source = DTwainSource::Select( ); if ( !Source.IsValid( ) ) return 0;
// Acquire to a multipage Group 4 TIFF file. Base file name is JOB0000 DTwainAcquirer Acquirer(Source); Acquirer.SetUIMode( false ). // no user interface SetMultiPageFileMode( ). // scan to a multipage file, not individual files EnableDuplex( true ). // enable the duplex unit. Acquire("FILE0000.TIF", FILETYPE_TIFFLZW); // start the acquisition }
|