VintaSoft Twain .NET SDK v10.3
Vintasoft.Twain Namespace / WebTwainDeviceJS type / getImageLayout Method
Function that will be executed if request is executed successfully.
Here is function prototype "function __success(data)". The data parameter has the following properties:
Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
  1. An object with following properties:
    • errorMessage (string): Error message.
    • blocked (boolean): Indicates that the requested action is blocked by another request.
    if exception is catched inside web service.
  2. Otherwise, jqXHR object.
In This Topic
    getImageLayout Method
    In This Topic
    Sends an asynchronous request to a server for getting information about current image layout rectangle of TWAIN device.
    Syntax
    var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName,
                                                       productFamily,
                                                       manufacturer,
                                                       driverVersion,
                                                       twainVersion,
                                                       deviceManager);
    var value; // Type: any
    
    // Parameters
    var successFunc; // Type:  object
    var errorFunc; // Type:  object
    
    value = instance.getImageLayout(successFunc, errorFunc);
    function getImageLayout( 
       successFunc : object,
       errorFunc : object
    ) : any;

    Parameters

    successFunc
    Function that will be executed if request is executed successfully.
    Here is function prototype "function __success(data)". The data parameter has the following properties:
    • frame (object): Current image layout rectangle of TWAIN device.
      Current image layout rectangle is object with the following properties:
      • x (number): Coordinate of the left top corner of the current image layout rectangle.
      • y (number): Coordinate of the left top corner of the current image layout rectangle.
      • width (number): Width of the current image layout rectangle.
      • height (number): Height of the current image layout rectangle.
    errorFunc
    Function that will be executed if request is failed.
    Here is function prototype "function __error(data)".
    The data parameter can be:
    1. An object with following properties:
      • errorMessage (string): Error message.
      • blocked (boolean): Indicates that the requested action is blocked by another request.
      if exception is catched inside web service.
    2. Otherwise, jqXHR object.
    Exceptions
    ExceptionDescription
    Thrown if device is not opened.
    Browser Compatibility
    9
    5
    15
    5
    See Also