DTWAIN_SetJobControl

Top  Previous  Next

The DTWAIN_SetJobControl function sets the current job control setting.

 

DTWAIN_BOOL DTWAIN_SetJobControl (

DTWAIN_SOURCE

Source,

LONG

JobControl,

DTWAIN_BOOL

bSetCurrent );

 

Parameters

Source

   An open TWAIN Source.

 

JobControl

   The job control to set

 

bSetCurrent

Determines whether to set the current job control or the default job control

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_SetJobControl function sets the current job control for the Source Source when acquiring a series of images.  The JobControl must be one of the Job Control constants.  If bSetCurrent is TRUE, the current job control denoted by JobControl is set. If bSetCurrent is FALSE, the default job control is set, and the JobControl argument is ignored. To distinguish between jobs, a job separator sheet containing a patch code can be inserted (please consult your TWAIN driver's manual for information on the patch code sheet).

 
Please note that the TWAIN device must support job control, and this can be queried by calling DTWAIN_IsJobControlSupported.  To discover what job control options are supported, call DTWAIN_EnumJobControls.

 

If calling DTWAIN_AcquireFile or DTWAIN_AcquireFileEx, and the file type to acquire to is a multi-page image file,  each job is saved to a separate image file.  For example,

 

Job control is used
8 pages are in the document feeder
Page 3 and 7 are job separator pages

 

Here are the differing job control scenarios concerning number of files created and whether the patch code pages are included:

 

Job Control Constant

Definition

Number of files created

Number of pages per file

 

DTWAIN_JC_NONE

No Job Control                

1

8 (includes job separator pages)

 

DTWAIN_JC_JSIC

Include job separator page, continue scanning        

3

File 1 - pages 1,2,3

File 2   pages 4, 5, 6, 7

File 3 - page 8

(each file includes the job separator page)

 

DTWAIN_JC_JSIS

Include job separator page, stop scanning        

 

1

3 (includes job separator page)

 

DTWAIN_JC_JSXC

Exclude job separator page, continue scanning        

3

File 1 - pages 1, 2

File 2 - pages 4, 5, 6

File 3 - page 8

(excludes job separator page)

 

DTWAIN_JC_JSXS

Exclude job separator page, stop scanning        

1

2 (excludes job separator page)

 

The names of the files that are generated follow the naming conventions described in DTWAIN_AcquireFile.

 

TWAIN State Transitions

The Source must be in State 4. or higher

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

DTWAIN Source Selection Function

 

 

See Also

Job Control Support