ImageGear.Web.Isis Namespace Client API Library > ImageGear.Web.Isis Namespace Client API~ImageGear.Web.Isis_namespace > ImageGear.Web.Isis Namespace Client API~ImageGear.Web.Isis.ImGearIsisScannerService : createSession Method |
ASP.NET Ajax Javascript (Specification) | |
---|---|
function createSession( createSessionArgs : ImGearIsisCreateSessionArgs ) : ImGearIsisOperationStatus; |
ASP.NET Ajax Javascript (Usage) | |
---|---|
var resultVar = instanceOfImGearIsisScannerService.createSession(ImGearIsisCreateSessionArgs); |
The JavaScript code below demonstrates how to create a session:
var scannerSession; ... function createSessionCallback(theScannerSession, status) { if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) { alert(status.get_statusMessage()); } // Store the scanner session. scannerSession = theScannerSession; } var scannerService = new ImageGear.Web.Isis.ImGearIsisScannerService(); scannerService.createSession({ applicationName: "ImageGear ISIS Application", destroyExistingSession: true, locale: "en-us", idleTimeoutMinutes: 0, callback: createSessionCallback });
This is an asynchronous method.
When this object creates a session, it searches for the network port that the local ISIS Captiva Cloud server is listening on. If the server cannot be found, the session will not be created.
Only one session can be open at a time. The restriction to a single session applies to all applications running on the same system. Only one application at a time can use ISIS Captiva Cloud features.
To license the ISIS functionality, the ImageGear.Web.Isis.ImGearIsisScannerService.imGearServicePath property must be set to the path of the ImageGear service before calling the createSession method. If it is not set to the path of the ImageGear service or if a valid license is not being used, the ISIS functionality works but each scanned image is watermarked and a maximum of 50 pages can be scanned.
This method can be passed an input parameter ImGearIsisCreateSessionArgs with properties applicationName, destroyExistingSession, locale, idleTimeoutMinutes, and callback. It is not necessary to create the ImGearIsisCreateSessionArgs. The parameters can also be passed as shown in the example below.
ImageGear.Web.Isis Namespace Client API~ImageGear.Web.Isis.ImGearIsisScannerService
ImGearIsisScannerService Members