VintaSoft Twain .NET SDK 15.1: Documentation for Web developer
Vintasoft.Twain Namespace / WebTwainDeviceJS type / setImageLayoutAsync Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
    setImageLayoutAsync Method
    In This Topic
    Sends an asynchronous request to set the image layout rectangle of TWAIN/SANE device.
    Syntax
    var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
    
    var value; // Type: any
    
    // Parameters
    var x; // Type: number
    var y; // Type: number
    var width; // Type: number
    var height; // Type: number
    var successFunc; // Type: function
    var errorFunc; // Type: function
    
    value = instance.setImageLayoutAsync(x, y, width, height, successFunc, errorFunc);
    
    
    function setImageLayoutAsync(
    x
    X-coordinate of image layout rectangle.
    : number,
    y
    Y-coordinate of image layout rectangle.
    : number,
    width
    Width of image layout rectangle.
    : number,
    height
    Height of image layout rectangle.
    : number,
    successFunc
    A function that will be executed if request is executed successfully. Function prototype: "successFunc(twainDevice)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class.
    : Function,
    errorFunc
    A function that will be executed if request is failed. Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'errorMessage' parameter is string that describes error.
    : Function
    ) : any;

    Parameters

    x
    X-coordinate of image layout rectangle.
    y
    Y-coordinate of image layout rectangle.
    width
    Width of image layout rectangle.
    height
    Height of image layout rectangle.
    successFunc
    A function that will be executed if request is executed successfully. Function prototype: "successFunc(twainDevice)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class.
    errorFunc
    A function that will be executed if request is failed. Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'errorMessage' parameter is string that describes error.
    Exceptions
    ExceptionDescription
    Thrown if arguments have wrong types OR device is not opened OR error occurs during setting the image layout rectangle of device.
    Remarks

    This function sends an asynchronous request to set the image layout rectangle of TWAIN device. If you want to use synchronous request instead of asynchronous request, please use WebTwainDeviceJS.setImageLayout function.

    Browser Compatibility
    9
    See Also