VintaSoft Twain .NET SDK 15.0: Documentation for Web developer
In This Topic
    Changes in version 14.0
    In This Topic
    Version 12.2 and earlier has API that allows to work with TWAIN device synchronously.

    Version 14.0 has API that allows to work with TWAIN device synchronously and asynchronously.
    VintaSoft JavaScript TWAIN Scanning Demo ("<SDK_install_path>\VintaSoft\Twain .NET v14.0\Examples\JavaScript\JavaScriptTwainScanningDemo\") contains examples (TwainScanningDemo-async.js and TwainScanningDemo-sync.js files), which demonstrate how to work with synchronous and asynchronous API.


    API changes in Vintasoft.Twain.js

    Changed classes:

    Vintasoft.Twain.WebTwainDeviceManagerJS
    Added methods
    public void closeAsync(function, function) Sends an asynchronous request to close TWAIN device manager.
    public void getDevicesAsync(function, function) Sends an asynchronous request to get a list of TWAIN devices installed in the system.


    Vintasoft.Twain.WebTwainDeviceJS
    Added methods
    public Vintasoft.Twain.WebTwainDeviceAcquireModalResultJS acquireModalSync() Does one step of synchronous image acquisition from TWAIN device (web server will not send response for image acquisition progress).
    public void closeAsync(function, function) Sends an asynchronous request to close TWAIN device.
    public void getCapabilitiesAsync(number[], number, function, function) Sends an asynchronous request to get values of TWAIN device capabilities.
    public void getCapabilitiesAsync(number[], Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS, function, function) Sends an asynchronous request to get values of TWAIN device capabilities.
    public void getCapabilitiesAsync(WebDeviceCapabilityIdEnumJS[], number, function, function) Sends an asynchronous request to get values of TWAIN device capabilities.
    public void getCapabilitiesAsync(WebDeviceCapabilityIdEnumJS[], Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS, function, function) Sends an asynchronous request to get values of TWAIN device capabilities.
    public void getCapabilityAsync(number, number, function, function) Sends an asynchronous request to get value of TWAIN device capability.
    public void getCapabilityAsync(number, Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS, function, function) Sends an asynchronous request to get value of TWAIN device capability.
    public void getCapabilityAsync(Vintasoft.Twain.WebDeviceCapabilityIdEnumJS, number, function, function) Sends an asynchronous request to get value of TWAIN device capability.
    public void getCapabilityAsync(Vintasoft.Twain.WebDeviceCapabilityIdEnumJS, Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS, function, function) Sends an asynchronous request to get value of TWAIN device capability.
    public void getDefaultImageLayoutAsync(function, function) Sends an asynchronous request to get information about the default image layout rectangle of TWAIN device.
    public void getImageLayoutAsync(function, function) Sends an asynchronous request to get information about the current image layout rectangle of TWAIN device.
    public void getSupportedCapabilitiesAsync(number, function, function) Sends an asynchronous request to get information about all capabilities supported by TWAIN device.
    public void getSupportedCapabilitiesAsync(Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS, function, function) Sends an asynchronous request to get information about all capabilities supported by TWAIN device.
    public void open(boolean) Opens TWAIN device (device will show progress indicator during image scan process).
    public void openAsync(boolean, boolean, function, function) Sends an asynchronous request to open TWAIN device.
    public void resetImageLayoutAsync(function, function) Sends an asynchronous request to reset the image layout rectangle of TWAIN device.
    public object[] setCapabilities(object[]) Sets values of TWAIN device capabilities.
    public void setCapabilitiesAsync(object[], function, function) Sends an asynchronous request to set values of TWAIN device capabilities.
    public void setCapabilityAsync(number, string, function, function) Sends an asynchronous request to set value of TWAIN device capability.
    public void setCapabilityAsync(Vintasoft.Twain.WebDeviceCapabilityIdEnumJS, string, function, function) Sends an asynchronous request to set value of TWAIN device capability.
    public void setImageLayoutAsync(number, number, number, number, function, function) Sends an asynchronous request to set the image layout rectangle of TWAIN device.


    Vintasoft.Twain.WebAcquiredImageCollectionJS
    Removed properties
    public number get_Item { get; } Use the getItem function instead.
    Added methods
    public void clearAsync(function, function) Sends an asynchronous request to clear this image collection.
    public void getAsBase64StringAsync(string, string[], function, function) Sends an asynchronous request to save images from this image collection to an image file and return file data as a Base64 string.
    public Vintasoft.Twain.WebAcquiredImageJS getItem(number) Returns an image in image collection.
    public Vintasoft.Twain.WebAcquiredImageJS removeAsync(Vintasoft.Twain.WebAcquiredImageJS, function, function) Sends an asynchronous request to remove image from image collection.
    public Vintasoft.Twain.WebAcquiredImageJS removeAtAsync(number, function, function) Sends an asynchronous request to remove image from image collection.
    public void saveImagesAsync(string, boolean, string[], function, function) Sends an asynchronous request to save images from this image collection to a local file.


    Vintasoft.Twain.WebAcquiredImageJS
    Added methods
    public void changeBrightnessAsync(number, function, function) Sends an asynchronous request to change brightness of image.
    public void changeContrastAsync(number, function, function) Sends an asynchronous request to change contrast of image.
    public void cropAsync(number, number, number, number, function, function) Sends an asynchronous request to crop an image.
    public void deskewAsync(number, number, number, function, function) Sends an asynchronous request to deskew an image.
    public void despeckleAsync(number, number, number, number, function, function) Sends an asynchronous request to despeckle an image.
    public void detectBorderAsync(number, function, function) Sends an asynchronous request to detect border of image.
    public string getAsBase64StringAsync(function, function) Sends an asynchronous request to get an image as a base64-string.
    public Vintasoft.Twain.WebAcquiredImageIsBlankResultJS invertAsync(function, function) Sends an asynchronous request to invert an image.
    public Vintasoft.Twain.WebAcquiredImageIsBlankResultJS isBlankAsync(number, function, function) Sends an asynchronous request to check whether an image is blank.
    public void resizeCanvasAsync(number, number, number, number, number, function, function) Sends an asynchronous request to resize canvas of image.
    public void rotate(number) Rotates an image with automatic detection of border color.
    public void rotateAsync(number, number, function, function) Sends an asynchronous request to rotate an image.