ImageGear .NET v25.2 - Updated
setScannerWithDialog Method

ImageGear.Web.Isis Library > ImageGear.Web.Isis Namespace > ImGearIsisScannerSession class : setScannerWithDialog Method
Loads and sets a user-selected scanner.
Syntax
ASP.NET Ajax Javascript (Specification) 
function setScannerWithDialog( 
   loadScannerOption : ImGearIsisLoadScannerOption,
   callback : function
) : ImGearIsisOperationStatus;
ASP.NET Ajax Javascript (Usage) 
var resultVar = instanceOfImGearIsisScannerSession.setScannerWithDialog(ImGearIsisLoadScannerOption,function);

Parameters

loadScannerOption
Scanner configuration options to make available to the application user.
callback
Callback which is called after a scanner is set.

Return Value

Example

The JavaScript code below demonstrates how to set a scanner using a scanner selection dialog:

function onScannerLoaded(status) {
    if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
        alert(status.get_statusMessage());
}

    // The scanner can now be accessed through the ImGearIsisScannerSession scanner property.
    var scanner = scannerSession.get_scanner();

    // You could use the getTag method or getAllTags method here to get the current scanner settings.
}

// Show the scanner selection dialog with a list of connected drivers.
scannerSession.setScannerWithDialog(ImageGear.Web.Isis.ImGearIsisLoadScannerOption.ShowConnectedDriverList, onScannerLoaded);
Remarks

This is an asynchronous method.

You must set a scanner before creating a scan job. Only one scanner can be set at a time. Any previously set scanner is unloaded automatically.

This method loads a scanner based on the user's selection. A built-in user interface is displayed to show the scanner list. If you want to manage the scanner list yourself, use the ImageGear.Web.Isis.ImGearIsisScannerSession.setScanner method instead. A list of scanner drivers on the machine can be retrieved using the getScanners method.

See Also

Reference

ImGearIsisScannerSession class
ImGearIsisScannerSession Members

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