VintaSoft Twain .NET SDK 15.0: Documentation for Web developer
Vintasoft.Twain Namespace / WebAcquiredImageCollectionJS type / saveImagesAsync Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
    saveImagesAsync Method
    In This Topic
    Sends an asynchronous request to save images from this image collection to a local file.
    Syntax
    var instance = new Vintasoft.Twain.WebAcquiredImageCollectionJS(twainDeviceManager);
    
    var value; // Type: any
    
    // Parameters
    var filePath; // Type: string
    var createNewFile; // Type: boolean
    var imageIds; // Type: string[]
    var successFunc; // Type: function
    var errorFunc; // Type: function
    
    value = instance.saveImagesAsync(filePath, createNewFile, imageIds, successFunc, errorFunc);
    
    
    function saveImagesAsync(
    filePath
    A path to a local file.
    : string,
    createNewFile
    A value indicating whether new file must be created.
    : boolean,
    imageIds
    An array of strings, which define identifiers of images, which must be saved.
    : string[],
    successFunc
    A function that will be executed if request is executed successfully. Function prototype: "successFunc(imageCollection, filePath, createNewFile, imageIds)", where 'imageCollection' parameter is an instance of WebAcquiredImageCollectionJS class, 'filePath' parameter is path to the created image file, 'createNewFile' parameter is boolean value indicating whether new file is created, 'imageIds' parameter is array of image identifiers.
    : Function,
    errorFunc
    A function that will be executed if request is failed. Function prototype: "errorFunc(imageCollection, errorMessage)", where 'imageCollection' parameter is an instance of WebAcquiredImageJS class, 'errorMessage' parameter is string that describes error.
    : Function
    ) : any;

    Parameters

    filePath
    A path to a local file.
    createNewFile
    A value indicating whether new file must be created.
    imageIds
    An array of strings, which define identifiers of images, which must be saved.
    successFunc
    A function that will be executed if request is executed successfully. Function prototype: "successFunc(imageCollection, filePath, createNewFile, imageIds)", where 'imageCollection' parameter is an instance of WebAcquiredImageCollectionJS class, 'filePath' parameter is path to the created image file, 'createNewFile' parameter is boolean value indicating whether new file is created, 'imageIds' parameter is array of image identifiers.
    errorFunc
    A function that will be executed if request is failed. Function prototype: "errorFunc(imageCollection, errorMessage)", where 'imageCollection' parameter is an instance of WebAcquiredImageJS class, 'errorMessage' parameter is string that describes error.
    Exceptions
    ExceptionDescription
    Thrown if arguments have wrong type OR imageIds is not an array of strings OR images are not saved.
    Remarks

    This function sends an asynchronous request to save images from this image collection to a local file. If you want to use synchronous request instead of asynchronous request, please use WebAcquiredImageCollectionJS.saveImages function.

    Browser Compatibility
    9
    See Also