ImageGear for C and C++ on Windows v20.0 - Updated
IG_ISIS_TAG_SCANAHEAD
API Reference Guide > ISIS Component API Reference > ISIS Component Tags Reference > Scanning Mode Tags > IG_ISIS_TAG_SCANAHEAD

Status of ScanAhead. 0x050D  1293

IG_ISIS_TAG_SCANAHEAD returns or allows the application to set the state of the ScanAhead feature.

Type:

IG_ISIS_TAG_TYPE_SHORT

Drivers:

Drivers for scanners that support ScanAhead.

Values:

Value Defined Constant Meaning
0 IG_ISIS_SCANAHEAD_NO ScanAhead not enabled.
1 IG_ISIS_SCANAHEAD_YES ScanAhead enabled.

Remarks:

Enable ScanAhead before calling IG_ISIS_run_zone to scan more pages than the application has requested. Either the scanner or the scanner driver will buffer the pages until they are requested by subsequent IG_ISIS_run_zone calls. Scanners which scan less than about 10 pages per minute typically do not support IG_ISIS_TAG_SCANAHEAD.

Usually, when the application scans a batch with ScanAhead enabled, it wants to scan all the pages in the feeder before exiting the scan loop. In some instances, such as if the application allows the user to cancel a batch during scanning, the application may need to stop scanning before the feeder is empty. At this point, there are often still pages left in the buffer that have already been scanned ahead. On most scanners, those pages will be lost. However, some high-speed scanners will allow those buffered pages to be retrieved if you stop the batch during the scan loop by setting IG_ISIS_TAG_SCANAHEAD to IG_ISIS_TAG_SCANAHEAD_NO. IG_ISIS_drv_is_page_loaded will then continue to report that a page is available until the buffer is empty. Query the IG_ISIS_TAG_FEEDER_PAUSE bit in IG_ISIS_TAG_FEEDER to determine if the scanner supports this feature.

Example:

The following example scans a ScanAhead batch and optionally exits the scan loop if the scanner supports the pause feeder feature and the user chooses to cancel the batch:

 
Copy Code
      IG_ISIS_tag_get_long(hDriver, IG_ISIS_TAG_FEEDER , 0, &lValue);
/* check if scanner supports pausing the feeder */
if (lValue & IG_ISIS_FEEDER_PAUSE)
        bFeederPause = 1;
else
        bFeederPause = 0;IG_ISIS_tag_set_long(hDriver, IG_ISIS_TAG_SCANAHEAD, 0, IG_ISIS_SCANAHEAD_YES);IG_ISIS_drv_is_page_loaded(hDriver, IG_ISIS_FEEDER_FEED, &lValue);
while (lValue & IG_ISIS_DRV_STACKPAGE)
{IG_ISIS_run_zone(lpDriver, Buffer, BUFSIZE);
/* stop batch if the user cancels */
        if (bFeederPause && CheckUserCancel())IG_ISIS_tag_set_long(hDriver, IG_ISIS_TAG_SCANAHEAD, 0, IG_ISIS_SCANAHEAD_NO);IG_ISIS_drv_is_page_loaded(hDriver, IG_ISIS_FEEDER_FEED, &lValue);
}

See Also

IG_ISIS_TAG_SCANAHEAD_PAGES

IG_ISIS_TAG_SCANAHEAD_MAXPAGES

IG_ISIS_TAG_FEEDER

Is this page helpful?
Yes No
Thanks for your feedback.