ImageGear for C and C++ on Windows v19.10 - Updated
IG_ISIS_TAG_DETECTJOBSEP
API Reference Guide > ISIS Component API Reference > ISIS Component Tags Reference > Scanning Mode Tags > IG_ISIS_TAG_DETECTJOBSEP

Mode for detecting job separator sheets. 0x05A7  1447

IG_ISIS_TAG_DETECTJOBSEP indicates or specifies the current mode for detecting job separator sheets during scanning.

Type:

IG_ISIS_TAG_TYPE_SHORT

Drivers:

Drivers for scanners that support batch or job separator sheet detection.

Values:

IG_ISIS_TAG_DETECTJOBSEP can be set to any one of the following values:

Meaning Value Defined Constant
Batch detection not enabled. 0 IG_ISIS_DETECTJOBSEP_OFF
Detect and scan separator, continue ScanAhead. 1 IG_ISIS_DETECTJOBSEP_NOSTOP_NOEJECT
Detect and scan separator, stop ScanAhead. 3 IG_ISIS_DETECTJOBSEP_STOP_NOEJECT
Detect and skip separator, continue ScanAhead. 2 IG_ISIS_DETECTSJOBSEP_NOSTOP_EJECT
5 IG_ISIS_DETECTJOBSEP_NOSTOP_EJTSCAN
Detect and skip separator, stop ScanAhead. 4 IG_ISIS_DETECTJOBSEP_STOP_EJECT
6 IG_ISIS_DETECTJOBSEP_STOP_EJTSCAN

Remarks:

There are two basic settings to consider when detecting job separators. The first setting applies to the separator sheet itself. When a separator sheet is detected, it can either be scanned into the document like any other page, or it can be skipped. The second setting applies to scanners that support ScanAhead. You can choose whether you want to stop ScanAhead when a separator sheet is detected. If you choose to stop ScanAhead, you may change scanner settings for the next batch of pages. If you do not stop ScanAhead, you cannot change your scanner settings because more pages may have already been scanned ahead using the current settings.

When a separator sheet is detected and IG_ISIS_TAG_DETECTJOBSEP is set to any value other than 0, IG_ISIS_run_zone will stop with the error IG_ISIS_ERR_BATCHSEP, and IG_ISIS_TAG_JOBSEPDETECTED will have a non-zero value.

The constants IG_ISIS_DETECTJOBSEP_NOSTOP_EJECT and IG_ISIS_DETECTJOBSEP_NOSTOP_EJTSCAN are equivalent in meaning and mutually exclusive. Some scanners support the first constant, while others support the second, never both. You should query the valid choices for IG_ISIS_TAG_DETECTJOBSEP supported on your scanner to determine the proper constants to use. The same applies to IG_ISIS_DETECTJOBSEP_STOP_EJECT and IG_ISIS_DETECTJOBSEP_STOP_EJTSCAN.

Example:

The following example sets the batch detection mode to "detect and skip separator, continue ScanAhead" then checks for job separator sheets detected during the scan loop:

 
Copy Code
/* set batch detection to Detect and skip separator, continue ScanAhead */IG_ISIS_tag_set_long(hDriver, IG_ISIS_TAG_DETECTJOBSEP, 0,
IG_ISIS_DETECTJOBSEP_NOSTOP_EJTSCAN);
/* somewhere later in the code */
while (1) {
        /* check for a page in the ADF */
        lStatus = IG_ISIS_drv_is_page_loaded(hDriver, 0, &lPageLoaded);
        /* if no pages in the ADF, batch detection is irrelevent */
        if (lPageLoaded != IG_ISIS_DRV_STACKPAGE)
                break;
        /* scan the page */
lStatus = IG_ISIS_run_zone(hDriver, buffer, sizeof(buffer));
        /* check for a separator sheet here */IG_ISIS_tag_get_long(hDriver, IG_ISIS_TAG_JOBSEPDETECTED, 0, &lJobSepDetected);
        if (lStatus == IG_ISIS_ERR_BATCHSEP || lJobSepDetected != 0) {
                printf("Job seperator was just detected.\n");
                /* if in _STOP mode, we can break out of the loop or change scan settings */
                /* if in _NOSTOP mode, we should keep scanning */
}
}

See Also

IG_ISIS_TAG_JOBSEPDETECTED