vintasoft-web-twain-js
Version:
VintaSoft Twain .NET SDK provides JavaScript API and VintaSoft Web TWAIN service, which allow to create web application for acquiring images from TWAIN or SANE scanner in Windows and Linux. Developed web applications can be used in all major web browsers
1,377 lines (1,078 loc) • 97.1 kB
TypeScript
// Copyright 2014-2025 VintaSoft LLC. All rights reserved.
// This software is protected by International copyright laws.
// Any copying, duplication, deployment, redistribution, modification or other
// disposition hereof is STRICTLY PROHIBITED without an express written license
// granted by VintaSoft LLC. This notice may not be removed or otherwise
// altered under any circumstances.
// This code may NOT be used apart of the VintaSoft product.
// NAMESPACE
declare module Vintasoft.Twain {
// ===== ENUMS =====
/**
* Specifies available usage modes for TWAIN device capability value.
*/
class WebTwainDeviceCapabilityUsageModeEnumJS extends Vintasoft.Shared.WebFlagsEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available states of the [see="WebTwainDeviceJS.acquireModalSync"] method.
*/
class WebAcquireModalStateEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available reduction methods for bit depth loss.
*/
class WebBitDepthReductionModeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available modes that defines how the internal scanner buffer must be cleared.
*/
class WebClearBufferModeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available duplex modes.
*/
class WebDuplexModeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available image filters.
*/
class WebImageFilterEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies how the batch job must be processed.
*/
class WebJobControlEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available light paths.
*/
class WebLightPathEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available color characteristic of the light sources used to acquire the image.
*/
class WebLightSourceEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available noise filter algorithms.
*/
class WebNoiseFilterEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available methods of image size detection.
*/
class WebPageAutoSizeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available page orientations.
*/
class WebPageOrientationEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available page sizes.
*/
class WebPageSizeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available pixel flavors for black-white images.
*/
class WebPixelFlavorEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available pixel types.
*/
class WebPixelTypeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available transfer modes.
*/
class WebTransferModeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available compressions of acquired images.
*/
class WebTwainImageCompressionEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available file formats for a file transfer mode.
*/
class WebTwainImageFileFormatEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available types of containers for TWAIN values.
*/
class WebTwainValueContainerTypeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available types of TWAIN values.
*/
class WebTwainValueTypeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available units of measure.
*/
class WebUnitOfMeasureEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available identifiers of device capabilities.
*/
class WebDeviceCapabilityIdEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available country codes for TWAIN device.
*/
class WebCountryCodeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available languages for TWAIN device.
*/
class WebLanguageTypeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
// ===== CLASSES =====
/**
* Contains information about TWAIN global settings.
*/
class WebTwainGlobalSettingsJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainGlobalSettingsJS"] class.
*/
constructor();
// METHODS
/**
* Registers the SDK for usage in web application.
* @param regUser Registered user.
* @param regUrl Registered URL.
* @param regCode Registration code.
* @param expirationDate Expiration date of evaluation license.
*/
static register(regUser: string, regUrl: string, regCode: string, expirationDate: string): void;
/**
* Registers the SDK for usage in web application.
* @param regUser Registered user.
* @param regUrl Registered URL.
* @param regCode Registration code.
*/
static register(regUser: string, regUrl: string, regCode: string): void;
/**
* Returns the name of user OS.
*/
static getUserOS(): string;
}
/**
* Defines a frame rectangle in units of measure used by TWAIN device.
*/
class WebTwainFrameJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainFrameJS"] class.
* @param left Value of the left-most edge of the rectangle, in [see="Vintasoft.Twain.WebUnitOfMeasureEnumJS"].
* @param top Value of the top-most edge of the rectangle, in [see="Vintasoft.Twain.WebUnitOfMeasureEnumJS"].
* @param right Value of the right-most edge of the rectangle, in [see="Vintasoft.Twain.WebUnitOfMeasureEnumJS"].
* @param bottom Value of the bottom-most edge of the rectangle, in [see="Vintasoft.Twain.WebUnitOfMeasureEnumJS"].
*/
constructor(left: number, top: number, right: number, bottom: number);
// PROPERTIES
/**
* Gets a value of the left-most edge of the rectangle, in units of measure used by device.
*/
get_Left(): number;
/**
* Sets a value of the left-most edge of the rectangle, in units of measure used by device.
* @param value A value of the left-most edge of the rectangle, in units of measure used by device.
*/
set_Left(value: number): void;
/**
* Gets a value of the top-most edge of the rectangle, in units of measure used by device.
*/
get_Top(): number;
/**
* Sets a value of the top-most edge of the rectangle, in units of measure used by device.
* @param value A value of the top-most edge of the rectangle, in units of measure used by device.
*/
set_Top(value: number): void;
/**
* Gets a value of the right-most edge of the rectangle, in units of measure used by device.
*/
get_Right(): number;
/**
* Sets a value of the right-most edge of the rectangle, in units of measure used by device.
* @param value A value of the right-most edge of the rectangle, in units of measure used by device.
*/
set_Right(value: number): void;
/**
* Gets a value of the bottom-most edge of the rectangle, in units of measure used by device.
*/
get_Bottom(): number;
/**
* Sets a value of the bottom-most edge of the rectangle, in units of measure used by device.
* @param value A value of the bottom-most edge of the rectangle, in units of measure used by device.
*/
set_Bottom(value: number): void;
// METHODS
/**
* Determines whether the specified frame is equal to the current frame.
* @param value Frame to compare with the current frame.
*/
equals(value: Vintasoft.Twain.WebTwainFrameJS): boolean;
/**
* Returns frame as rectangle.
*/
toRectangle(): object;
/**
* Returns the string representation of this object.
*/
toString(): string;
}
/**
* Contains information about range of values.
*/
class WebTwainRangeJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainRangeJS"] class.
* @param minValue Minimum value of range.
* @param maxValue Maximum value of range.
* @param stepSize Step size between minimum and maximum values of range.
*/
constructor(minValue: number, maxValue: number, stepSize: number);
// PROPERTIES
/**
* Gets a minimum value of device capability.
*/
get_MinValue(): number;
/**
* Gets a maximum value of device capability.
*/
get_MaxValue(): number;
/**
* Gets a step size between minimum and maximum values of device capability.
*/
get_StepSize(): number;
}
/**
* Contains information about image layout of TWAIN device.
*/
class WebTwainImageLayoutJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainImageLayoutJS"] class.
* @param x X-coordinate of the left-top corner of image layout rectangle.
* @param y Y-coordinate of the left-top corner of image layout rectangle.
* @param width Width of image layout rectangle.
* @param height Height of image layout rectangle.
*/
constructor(x: number, y: number, width: number, height: number);
// PROPERTIES
/**
* Gets X-coordinate of the left-top corner of image layout rectangle.
*/
get_X(): number;
/**
* Gets Y-coordinate of the left-top corner of image layout rectangle.
*/
get_Y(): number;
/**
* Gets width of image layout rectangle.
*/
get_Width(): number;
/**
* Gets height of image layout rectangle.
*/
get_Height(): number;
}
/**
* Contains information about value of TWAIN device capability.
*/
class WebTwainCapabilityInfoJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainCapabilityInfoJS"] class.
* @param id Identifier of device capability.
* @param name Name of device capability.
* @param containerType Instance of [see="WebTwainValueContainerTypeEnumJS"] class that represents the container type of device capability value.
* @param valueType Instance of [see="WebTwainValueTypeEnumJS"] class that represents the type of device capability value.
* @param currentValue The current value of device capability.
* @param defaultValue The default value of device capability.
* @param supportedValues An instance of [see="WebTwainCapabilitySupportedValuesJS"] class.
*/
constructor(id: number, name: string, containerType: Vintasoft.Twain.WebTwainValueContainerTypeEnumJS, valueType: Vintasoft.Twain.WebTwainValueTypeEnumJS, currentValue: object, defaultValue: object, supportedValues: Vintasoft.Twain.WebTwainCapabilitySupportedValuesJS);
// PROPERTIES
/**
* Gets an identifier of device capability.
*/
get_Id(): number;
/**
* Gets name of device capability.
*/
get_Name(): string;
/**
* Gets the container type of device capability value.
*/
get_ContainerType(): Vintasoft.Twain.WebTwainValueContainerTypeEnumJS;
/**
* Gets the type of device capability value.
*/
get_ValueType(): Vintasoft.Twain.WebTwainValueTypeEnumJS;
/**
* Gets current value of device capability.
*/
get_CurrentValue(): object;
/**
* Gets the default value of device capability.
*/
get_DefaultValue(): object;
/**
* Gets the supported values of device capability.
*/
get_SupportedValues(): Vintasoft.Twain.WebTwainCapabilitySupportedValuesJS;
}
/**
* Contains information about supported values of TWAIN device capability.
*/
class WebTwainCapabilitySupportedValuesJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainCapabilitySupportedValuesJS"] class.
* @param supportedValuesAsArray An array with supported values of device capability if supported value are represented by array.
* @param supportedValuesAsRange Instance of [see="WebTwainRangeJS"] class.
*/
constructor(supportedValuesAsArray: object[], supportedValuesAsRange: Vintasoft.Twain.WebTwainRangeJS);
// PROPERTIES
/**
* Gets supported values as an array.
*/
get_SupportedValuesAsArray(): object[];
/**
* Gets supported values as a range value.
*/
get_SupportedValuesAsRange(): Vintasoft.Twain.WebTwainRangeJS;
}
/**
* Represents settings for initializing of TWAIN/SANE device manager.
*/
class WebTwainDeviceManagerInitSettingsJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainDeviceManagerInitSettingsJS"] class.
*/
constructor();
// PROPERTIES
/**
* Gets a value indicating whether TWAIN 2.x Data Source Manager should be used.
*/
get_IsTwain2Compatible(): boolean;
/**
* Sets a value indicating whether TWAIN 2.x Data Source Manager should be used.
* @param value True - TWAIN 2.x Data Source Manager (TWAINDSM.DLL) should be used; False - TWAIN 1.x Data Source Manager (TWAIN_32.DLL) should be used.
*/
set_IsTwain2Compatible(value: boolean): void;
/**
* Gets a value indicating whether TWAIN device manager supports 32-bit devices.
*/
get_Is32BitDevicesSupported(): boolean;
/**
* Sets a value indicating whether TWAIN device manager should support 32-bit devices.
* @param value True - TWAIN device manager should support 32-bit devices; False - TWAIN device manager should not support 32-bit devices.
*/
set_Is32BitDevicesSupported(value: boolean): void;
/**
* Gets a value indicating whether TWAIN device manager supports 64-bit devices.
*/
get_Is64BitDevicesSupported(): boolean;
/**
* Sets a value indicating whether TWAIN device manager should support 64-bit devices.
* @param value True - TWAIN device manager should support 64-bit devices; False - TWAIN device manager should not support 64-bit devices.
*/
set_Is64BitDevicesSupported(value: boolean): void;
/**
* Gets the country code, which must be used by TWAIN device manager.
*/
get_CountryCode(): Vintasoft.Twain.WebCountryCodeEnumJS;
/**
* Sets the country code, which must be used by TWAIN device manager.
* @param value An instance of [see="WebCountryCodeEnumJS"] class that defines the country code. Default value is "USA".
*/
set_CountryCode(value: Vintasoft.Twain.WebCountryCodeEnumJS): void;
/**
* Gets the language, which must be used by TWAIN device manager.
*/
get_LanguageType(): Vintasoft.Twain.WebLanguageTypeEnumJS;
/**
* Sets the language, which must be used by TWAIN device manager.
* @param value An instance of [see="WebLanguageTypeEnumJS"] class that defines the language. Default value is "English".
*/
set_LanguageType(value: Vintasoft.Twain.WebLanguageTypeEnumJS): void;
/**
* Gets a value indicating whether the TWAIN device UI window must be shown as a top most window.
*/
get_TopMostUiWindow(): boolean;
/**
* Sets a value indicating whether the TWAIN device UI window must be shown as a top most window.
* @param value True - TWAIN device UI window must be shown as a top most window if parent window is NOT specified; otherwise, false.
*/
set_TopMostUiWindow(value: boolean): void;
/**
* Gets an interval, in milliseconds, during which the device manager must refresh its session.
*/
get_AllowableSessionInactivityTime(): number;
/**
* Sets an interval, in milliseconds, during which the device manager must refresh its session.
* @param value An interval, in milliseconds, during which the device manager must refresh its session. Default value is 60000 milliseconds (1 minute). Minimum value is 100, maximum value is 3600000.
*/
set_AllowableSessionInactivityTime(value: number): void;
}
/**
* Class that allows to work with TWAIN/SANE device manager.
*/
class WebTwainDeviceManagerJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainDeviceManagerJS"] class.
* @param service An instance of [see="WebServiceJS"] class that should be used for working with TWAIN device manager.
*/
constructor(service: Vintasoft.Shared.WebServiceJS);
/**
* Initializes a new instance of the [see= "WebTwainDeviceManagerJS"] class.
*/
constructor();
// PROPERTIES
/**
* Gets a value indicating whether the device manager is opened.
*/
get_IsOpened(): boolean;
/**
* Gets a value indicating whether TWAIN 2.x Data Source Manager should be used.
*/
get_IsTwain2Compatible(): boolean;
/**
* Gets the device, which is opened in device manager.
*/
get_OpenedDevice(): Vintasoft.Twain.WebTwainDeviceJS;
/**
* Gets version of VintaSoft Web TWAIN service.
*/
get_TwainServiceVersion(): string;
/**
* Gets version of VintaSoft Web TWAIN API.
*/
get_TwainApiVersion(): string;
/**
* Gets the identifier of TWAIN session.
*/
get_TwainSessionId(): string;
// METHODS
/**
* Gets a list of TWAIN/SANE devices installed in the system.
*/
get_Devices(): Vintasoft.Twain.WebTwainDeviceJS[];
/**
* Gets the default TWAIN/SANE device.
*/
get_DefaultDevice(): Vintasoft.Twain.WebTwainDeviceJS;
/**
* Opens TWAIN/SANE device manager.
* @param initSettings An instance of [see="WebTwainDeviceManagerInitSettingsJS"] class that defines initialization settings for TWAIN device manager.
*/
open(initSettings: Vintasoft.Twain.WebTwainDeviceManagerInitSettingsJS): void;
/**
* Sends an asynchronous request to open TWAIN/SANE device manager.
* @param initSettings An instance of [see="WebTwainDeviceManagerInitSettingsJS"] class that defines initialization settings for TWAIN device manager.
* @param successFunc A function that will be executed if request is executed successfully. Function prototype: "successFunc(twainDeviceManager)", where 'twainDeviceManager' parameter is an instance of WebTwainDeviceManagerJS class.
* @param errorFunc A function that will be executed if request is failed. Function prototype: "errorFunc(twainDeviceManager, errorMessage)", where 'twainDeviceManager' parameter is an instance of WebTwainDeviceManagerJS class, 'errorMessage' parameter is string that describes error.
*/
openAsync(initSettings: Vintasoft.Twain.WebTwainDeviceManagerInitSettingsJS, successFunc: Function, errorFunc: Function): void;
/**
* Closes TWAIN/SANE device manager.
*/
close(): void;
/**
* Sends an asynchronous request to close TWAIN/SANE device manager.
* @param successFunc A function that will be executed if request is executed successfully.<br /> Function prototype: "successFunc(twainDeviceManager)", where 'twainDeviceManager' parameter is an instance of [see="WebTwainDeviceManagerJS"] class.
* @param errorFunc A function that will be executed if request is failed.<br /> Function prototype: "errorFunc(twainDeviceManager, errorMessage)", where 'twainDeviceManager' parameter is an instance of [see="WebTwainDeviceManagerJS"] class, 'errorMessage' parameter is string that describes error.
*/
closeAsync(successFunc: Function, errorFunc: Function): void;
/**
* Sends an asynchronous request to get a list of TWAIN/SANE devices installed in the system.
* @param successFunc A function that will be executed if request is executed successfully.<br /> Function prototype: "successFunc(twainDeviceManager, twainDevices, defaultTwainDevice)", where 'twainDeviceManager' parameter is an instance of [see="WebTwainDeviceManagerJS"] class, 'twainDevices' parameter is an array of instances of [see="WebTwainDeviceJS"] class, 'defaultTwainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class.
* @param errorFunc A function that will be executed if request is failed.<br /> Function prototype: "errorFunc(twainDeviceManager, errorMessage)", where 'twainDeviceManager' parameter is an instance of [see="WebTwainDeviceManagerJS"] class, 'errorMessage' parameter is string that describes error.
*/
getDevicesAsync(successFunc: Function, errorFunc: Function): void;
/**
* Finds TWAIN/SANE device by device name.
* @param deviceName The name of TWAIN/SANE device.
*/
findDeviceByName(deviceName: string): object;
}
/**
* Class that allows to work with automatic document feeder of TWAIN device.
*/
class WebTwainDeviceDocumentFeederJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainDeviceDocumentFeederJS"] class.
* @param device An instance of [see="WebTwainDeviceJS"] class.
*/
constructor(device: Vintasoft.Twain.WebTwainDeviceJS);
// PROPERTIES
/**
* Gets a value that indicates whether the document feeder is enabled.
*/
get_Enabled(): boolean;
/**
* Sets a value that indicates whether the document feeder is enabled.
* @param value A value that indicates whether the document feeder is enabled.
*/
set_Enabled(value: boolean): void;
/**
* Gets a value that indicates whether the document feeder can detect paper.
*/
get_PaperDetectable(): boolean;
/**
* Gets a value that indicates whether the document feeder is loaded.
*/
get_Loaded(): boolean;
/**
* Gets the duplex mode supported by device.
*/
get_DuplexMode(): Vintasoft.Twain.WebDuplexModeEnumJS;
/**
* Gets a value that indicates whether the duplex scanning is enabled.
*/
get_DuplexEnabled(): boolean;
/**
* Sets a value that indicates whether the duplex scanning is enabled.
* @param value A value that indicates whether the duplex scanning is enabled.
*/
set_DuplexEnabled(value: boolean): void;
/**
* Gets a value that indicates whether the auto feed feature is enabled.
*/
get_AutoFeed(): boolean;
/**
* Sets a value that indicates whether the auto feed feature is enabled.
* @param value A value that indicates whether the auto feed feature is enabled.
*/
set_AutoFeed(value: boolean): void;
// METHODS
/**
* Feeds the page in the document feeder.
*/
feedPage(): void;
/**
* Clears the page in the document feeder.
*/
clearPage(): void;
/**
* Rewinds the page in the document feeder.
*/
rewindPage(): void;
}
/**
* Class that allows to work with TWAIN/SANE device.
*/
class WebTwainDeviceJS {
// CONTSRUCTORS
/**
* Initializes a new instance of the [see= "WebTwainDeviceJS"] class.
* @param deviceName Device name.
* @param productFamily Device product family.
* @param manufacturer Device manufacturer.
* @param driverVersion Device driver version.
* @param twainVersion Device TWAIN version.
* @param deviceManager An instance of [see="WebTwainDeviceManagerJS"] class.
* @param is64Bit A value indicating whether the TWAIN device is 64-bit.
*/
constructor(deviceName: string, productFamily: string, manufacturer: string, driverVersion: string, twainVersion: string, deviceManager: Vintasoft.Twain.WebTwainDeviceManagerJS, is64Bit: boolean);
// PROPERTIES
/**
* Gets a value indicating whether the device is opened.
*/
get_IsOpened(): boolean;
/**
* Gets the device name.
*/
get_DeviceName(): string;
/**
* Gets the device product family.
*/
get_ProductFamily(): string;
/**
* Gets the device manufacturer.
*/
get_Manufacturer(): string;
/**
* Gets the device name.
*/
get_DeviceName(): string;
/**
* Gets the version of device driver.
*/
get_DriverVersion(): string;
/**
* Gets the TWAIN version supported by device.
*/
get_TwainVersion(): string;
/**
* Gets a value indicating whether device is compatible with TWAIN 2.
*/
get_IsTwain2Compatible(): boolean;
/**
* Gets a value indicating whether the device is WIA device.
*/
get_IsWIA(): boolean;
/**
* Gets a value indicating whether device is 64-bit.
*/
get_Is64Bit(): boolean;
/**
* Gets a value indicating whether device has the automatic document feeder.
*/
get_HasFeeder(): boolean;
/**
* Gets a value indicating whether device has flatbed.
*/
get_HasFlatbed(): boolean;
/**
* Gets an object that allows to manipulate the document feeder of TWAIN device.
*/
get_DocumentFeeder(): Vintasoft.Twain.WebTwainDeviceDocumentFeederJS;
/**
* Gets a value indicating whether the brightness should be automatically detected.
*/
get_AutoBright(): boolean;
/**
* Sets a value indicating whether the brightness should be automatically detected.
* @param value A value indicating whether the brightness should be automatically detected.
*/
set_AutoBright(value: boolean): void;
/**
* Gets a value indicating whether the device should capture the number of images indicated by the value of XferCount without waiting for the Application to request the image transfers.
*/
get_AutoScan(): boolean;
/**
* Sets a value indicating whether the device should capture the number of images indicated by the value of XferCount without waiting for the Application to request the image transfers.
* @param value A value indicating whether the device should capture the number of images indicated by the value of XferCount without waiting for the Application to request the image transfers.
*/
set_AutoScan(value: boolean): void;
/**
* Gets bit depth of images for current scan session.
*/
get_BitDepth(): number;
/**
* Sets bit depth of images for current scan session.
* @param value Bit depth of images for current scan session.
*/
set_BitDepth(value: number): void;
/**
* Gets bit depth reduction mode of images for current scan session.
*/
get_BitDepthReductionMode(): Vintasoft.Twain.WebBitDepthReductionModeEnumJS;
/**
* Sets bit depth reduction mode of images for current scan session.
* @param value An instance of [see="WebBitDepthReductionModeEnumJS"] class.
*/
set_BitDepthReductionMode(value: Vintasoft.Twain.WebBitDepthReductionModeEnumJS): void;
/**
* Gets brightness of gray/palette/color images for current scan session.
*/
get_Brightness(): number;
/**
* Sets brightness of gray/palette/color images for current scan session.
* @param value The brightness of gray/palette/color images for current scan session.
*/
set_Brightness(value: number): void;
/**
* Gets count of images in the device buffer.
*/
get_BufferedImageCount(): number;
/**
* Sets a value that defines how device buffers must be cleared.
* @param value An instance of [see="WebClearBufferModeEnumJS"] class.
*/
set_ClearBuffers(value: Vintasoft.Twain.WebClearBufferModeEnumJS): void;
/**
* Gets contrast of gray/palette/color images for current scan session.
*/
get_Contrast(): number;
/**
* Sets contrast of gray/palette/color images for current scan session.
* @param value The contrast of gray/palette/color images for current scan session.
*/
set_Contrast(value: number): void;
/**
* Gets file format for images when File transfer mode is used.
*/
get_FileFormat(): Vintasoft.Twain.WebTwainImageFileFormatEnumJS;
/**
* Sets file format for images when File transfer mode is used.
* @param value An instance of [see="WebTwainImageFileFormatEnumJS"] class.
*/
set_FileFormat(value: Vintasoft.Twain.WebTwainImageFileFormatEnumJS): void;
/**
* Gets the JPEG quality for acquired images saved as JPEG files when File transfer mode is used.
*/
get_FileJpegQuality(): number;
/**
* Sets the JPEG quality for acquired images saved as JPEG files when File transfer mode is used.
* @param value The JPEG quality for acquired images saved as JPEG files when File transfer mode is used.
*/
set_FileJpegQuality(value: number): void;
/**
* Gets halftones for bit depth reduction of images for current scan session.
*/
get_Halftones(): string;
/**
* Sets halftones for bit depth reduction of images for current scan session.
* @param value The halftones for bit depth reduction of images for current scan session.
*/
set_Halftones(value: string): void;
/**
* Gets image compression for images when Memory or File transfer mode is used.
*/
get_ImageCompression(): Vintasoft.Twain.WebTwainImageCompressionEnumJS;
/**
* Sets image compression for images when Memory or File transfer mode is used.
* @param value An instance of [see="WebTwainImageCompressionEnumJS"] class.
*/
set_ImageCompression(value: Vintasoft.Twain.WebTwainImageCompressionEnumJS): void;
/**
* Gets image filter for current scan session.
*/
get_ImageFilter(): Vintasoft.Twain.WebImageFilterEnumJS;
/**
* Sets image filter for current scan session.
* @param value An instance of [see="WebImageFilterEnumJS"] class.
*/
set_ImageFilter(value: Vintasoft.Twain.WebImageFilterEnumJS): void;
/**
* Gets a value that defines how the batch job must be processed.
*/
get_JobControl(): Vintasoft.Twain.WebJobControlEnumJS;
/**
* Sets a value that defines how the batch job must be processed.
* @param value An instance of [see="WebJobControlEnumJS"] class.
*/
set_JobControl(value: Vintasoft.Twain.WebJobControlEnumJS): void;
/**
* Gets a value indicating whether the lamp of device is on.
*/
get_LampState(): boolean;
/**
* Sets a value indicating whether the lamp of device is on.
* @param value A value indicating whether the lamp of device is on.
*/
set_LampState(value: boolean): void;
/**
* Gets the light path, which must be used for the image capturing.
*/
get_LightPath(): Vintasoft.Twain.WebLightPathEnumJS;
/**
* Sets the light path, which must be used for the image capturing.
* @param value An instance of [see="WebLightPathEnumJS"] class.
*/
set_LightPath(value: Vintasoft.Twain.WebLightPathEnumJS): void;
/**
* Gets a value that defines general color characteristic of the light source for current scan session.
*/
get_LightSource(): Vintasoft.Twain.WebLightSourceEnumJS;
/**
* Sets a value that defines general color characteristic of the light source for current scan session.
* @param value An instance of [see="WebLightSourceEnumJS"] class.
*/
set_LightSource(value: Vintasoft.Twain.WebLightSourceEnumJS): void;
/**
* Gets number of images that the device can buffer when AutoScan is enabled.
*/
get_MaxBatchBuffers(): number;
/**
* Sets number of images that the device can buffer when AutoScan is enabled.
* @param value The number of images that the device can buffer when AutoScan is enabled.
*/
set_MaxBatchBuffers(value: number): void;
/**
* Gets the noise filter for current scan session.
*/
get_NoiseFilter(): Vintasoft.Twain.WebNoiseFilterEnumJS;
/**
* Sets the noise filter for current scan session.
* @param value An instance of [see="WebNoiseFilterEnumJS"] class.
*/
set_NoiseFilter(value: Vintasoft.Twain.WebNoiseFilterEnumJS): void;
/**
* Gets a value indicating whether the device is powered up and available.
*/
get_Online(): boolean;
/**
* Gets the page size detection mode for current scan session.
*/
get_PageAutoSize(): Vintasoft.Twain.WebPageAutoSizeEnumJS;
/**
* Sets the page size detection mode for current scan session.
* @param value An instance of [see="WebPageAutoSizeEnumJS"] class.
*/
set_PageAutoSize(value: Vintasoft.Twain.WebPageAutoSizeEnumJS): void;
/**
* Gets orientation of images for current scan session.
*/
get_PageOrientation(): Vintasoft.Twain.WebPageOrientationEnumJS;
/**
* Sets orientation of images for current scan session.
* @param value An instance of [see="WebPageOrientationEnumJS"] class.
*/
set_PageOrientation(value: Vintasoft.Twain.WebPageOrientationEnumJS): void;
/**
* Gets page size for current scan session.
*/
get_PageSize(): Vintasoft.Twain.WebPageSizeEnumJS;
/**
* Sets page size for current scan session.
* @param value An instance of [see="WebPageSizeEnumJS"] class.
*/
set_PageSize(value: Vintasoft.Twain.WebPageSizeEnumJS): void;
/**
* Gets pixel flavor for current scan session.
*/
get_PixelFlavor(): Vintasoft.Twain.WebPixelFlavorEnumJS;
/**
* Sets pixel flavor for current scan session.
* @param value An instance of [see="WebPixelFlavorEnumJS"] class.
*/
set_PixelFlavor(value: Vintasoft.Twain.WebPixelFlavorEnumJS): void;
/**
* Gets pixel type of images for current scan session.
*/
get_PixelType(): Vintasoft.Twain.WebPixelTypeEnumJS;
/**
* Sets pixel type of images for current scan session.
* @param value An instance of [see="WebPixelTypeEnumJS"] class.
*/
set_PixelType(value: Vintasoft.Twain.WebPixelTypeEnumJS): void;
/**
* Gets X-axis resolution of images for current scan session.
*/
get_XResolution(): number;
/**
* Sets X-axis resolution of images for current scan session.
* @param value X-axis resolution.
*/
set_XResolution(value: number): void;
/**
* Gets Y-axis resolution of images for current scan session.
*/
get_YResolution(): number;
/**
* Sets Y-axis resolution of images for current scan session.
* @param value Y-axis resolution.
*/
set_YResolution(value: number): void;
/**
* Gets threshold of black-white images for current scan session.
*/
get_Threshold(): number;
/**
* Sets threshold of black-white images for current scan session.
* @param value A threshold for black-white images.
*/
set_Threshold(value: number): void;
/**
* Gets transfer mode for current scan session.
*/
get_TransferMode(): Vintasoft.Twain.WebTransferModeEnumJS;
/**
* Sets transfer mode for current scan session.
* @param value An instance of [see="WebTransferModeEnumJS"] class.
*/
set_TransferMode(value: Vintasoft.Twain.WebTransferModeEnumJS): void;
/**
* Gets unit of measure for current scan session.
*/
get_UnitOfMeasure(): Vintasoft.Twain.WebUnitOfMeasureEnumJS;
/**
* Sets unit of measure for current scan session.
* @param value An instance of [see="Vintasoft.Twain.WebUnitOfMeasureEnumJS"] class.
*/
set_UnitOfMeasure(value: Vintasoft.Twain.WebUnitOfMeasureEnumJS): void;
/**
* Gets count of images application wants to receive from the device.
*/
get_XferCount(): number;
/**
* Sets count of images application wants to receive from the device.
* @param value Count of images application wants to receive from the device.
*/
set_XferCount(value: number): void;
/**
* Gets name of scan source of SANE device.
*/
get_SaneScanSource(): string;
/**
* Sets name of scan source of SANE device.
* @param value A name of scan source of SANE device.
*/
set_SaneScanSource(value: string): void;
/**
* Gets name of scan mode of SANE device.
*/
get_SaneScanMode(): string;
/**
* Sets name of scan mode of SANE device.
* @param value A name of scan mode of SANE device.
*/
set_SaneScanMode(value: string): void;
/**
* Gets image resolution of SANE device.
*/
get_SaneResolution(): number;
/**
* Sets image resolution of SANE device.
* @param value Resolution.
*/
set_SaneResolution(value: number): void;
// METHODS
/**
* Opens TWAIN/SANE device.
* @param showUI <b>True</b> - device UI must be shown; <b>false</b> - device UI must NOT be shown.
* @param showIndicators <b>True</b> - device should show progress indicator during image scan process; <b>false</b> - device should not show progress indicator during image scan process. Default value is <b>true</b>.
*/
open(showUI: boolean, showIndicators: boolean): void;
/**
* Opens TWAIN/SANE device (device will show progress indicator during image scan process).
* @param showUI <b>True</b> - device UI must be shown; <b>false</b> - device UI must NOT be shown.
*/
open(showUI: boolean): void;
/**
* Sends an asynchronous request to open TWAIN/SANE device.
* @param showUI <b>True</b> - device UI must be shown; <b>false</b> - device UI must NOT be shown.
* @param showIndicators <b>True</b> - device should show progress indicator during image scan process; <b>false</b> - device should not show progress indicator during image scan process. Default value is <b>true</b>.
* @param successFunc A function that will be executed if request is executed successfully.<br /> Function prototype: "successFunc(twainDevice)", where 'twainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class.
* @param errorFunc A function that will be executed if request is failed.<br /> Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class, 'errorMessage' parameter is string that describes error.
*/
openAsync(showUI: boolean, showIndicators: boolean, successFunc: Function, errorFunc: Function): void;
/**
* Closes TWAIN/SANE device.
*/
close(): void;
/**
* Sends an asynchronous request to close TWAIN/SANE device.
* @param successFunc A function that will be executed if request is executed successfully.<br /> Function prototype: "successFunc(twainDevice)", where 'twainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class.
* @param errorFunc A function that will be executed if request is failed.<br /> Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class, 'errorMessage' parameter is string that describes error.
*/
closeAsync(successFunc: Function, errorFunc: Function): void;
/**
* Does one step of synchronous image acquisition from TWAIN/SANE device.
* @param isProgressResponseEnabled A value indicating whether web server should send response for image acquisition progress. If undefined, <b>false</b> is used.
*/
acquireModalSync(isProgressResponseEnabled: boolean): Vintasoft.Twain.WebTwainDeviceAcquireModalResultJS;
/**
* Does one step of synchronous image acquisition from TWAIN/SANE device (web server will not send response for image acquisition progress).
*/
acquireModalSync(): Vintasoft.Twain.WebTwainDeviceAcquireModalResultJS;
/**
* Sends an asynchronous request to do one step of synchronous image acquisition from TWAIN/SANE device.
* @param successFunc A function that will be executed if request is executed successfully.<br /> Function prototype: "successFunc(twainDevice, acquireModalResult)", where 'twainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class, 'acquireModalResult' parameter is an instance of [see="WebTwainDeviceAcquireModalResultJS"] class.
* @param errorFunc A function that will be executed if request is failed.<br /> Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class, 'errorMessage' parameter is string that describes error.
* @param isProgressResponseEnabled A value indicating whether web server should send response for image acquisition progress. Default value is True.
*/
acquireModalAsync(successFunc: Function, errorFunc: Function, isProgressResponseEnabled: boolean): void;
/**
* Sends an asynchronous request to do one step of synchronous image acquisition from TWAIN/SANE device. Response for image acquisition progress is not generated.
* @param successFunc A function that will be executed if request is executed successfully.<br /> Function prototype: "successFunc(twainDevice, acquireModalResult)", where 'twainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class, 'acquireModalResult' parameter is an instance of [see="WebTwainDeviceAcquireModalResultJS"] class.
* @param errorFunc A function that will be executed if request is failed.<br /> Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of [see="WebTwainDeviceJS"] class, 'errorMessage' parameter is string that describes error.
*/
acquireModalAsync(successFunc: Function, errorFunc: Function): void;
/**
* Sends an asynchronous request to cancel current image scanning process.
*/
cancelTransfer(): void;
/**
* Returns information about all capabilities supported by TWAIN device.
* @param usageMode An integer value, which defines usage mode of TWAIN device capability.
*/
getSupportedCapabilities(usageMode: number): Vintasoft.Twain.WebTwainCapabilityInfoJS[];
/**
* Returns information about all capabilities supported by TWAIN device.
* @param usageMode An instance of [see="WebTwainDeviceCapabilityUsageModeEnumJS"] class.
*/
getSupportedCapabilities(usageMode: Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS): Vintasoft.Twain.WebTwainCapabilityInfoJS[];
/**
* Returns information about all capabilities supported by TWAIN device. Function gets information using Get usage mode.
*/
getSupportedCapabilities(): Vintasoft.Twain.WebTwainCapabilityInfoJS[];
/**
* Sends an asynchronous request to get information about all capabilities supported by TWAIN device.
* @param usageMode An integer value, which defines usage mode of TWAIN device capability.
* @param successFunc A function that will be executed if request is executed successfully.<br /> Function prototype: "successFunc(twainDevice, capInfos)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'capInfos' parameter is an array that contains information about TWAIN device capabilities.
* @param errorFunc A function that will be executed if request is failed.<br /> Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'errorMessage' parameter is string that describes error.
*/
getSupportedCapabilitiesAsync(usageMode: number, successFunc: Function, errorFunc: Function): void;
/**
* Sends an asynchronous request to get information about all capabilities supported by TWAIN device.
* @param usageMode An instance of [see="WebTwainDeviceCapabilityUsageModeEnumJS"] class.
* @param successFunc A function that will be executed if request is executed successfully.<br /> Function prototype: "successFunc(twainDevice, capInfos)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'capInfos' parameter is an array that contains information about TWAIN device capabilities.
* @param errorFunc A function that will be executed if request is failed.<br /> Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'errorMessage' parameter is string that describes error.
*/
getSupportedCapabilitiesAsync(usageMode: Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS, successFunc: Function, errorFunc: Function): void;
/**
* Returns information about TWAIN device capability.
* @param twainCapabilityId An integer value, which defines identifier of device capability.
* @param usageMode An integer value, which defines usage mode of device capability.
*/
getCapability(twainCapabilityId: number, usageMode: number): Vintasoft.Twain.WebTwainCapabilityInfoJS;
/**
* Returns information about TWAIN device capability.
* @param twainCapabilityId An instance of [see="WebDeviceCapabilityIdEnumJS"] class.
* @param usageMode An integer value, which defines usage mode of device capability.
*/
getCapability(twainCapabilityId: Vintasoft.Twain.WebDeviceCapabilityIdEnumJS, usageMode: number): Vintasoft.Twain.WebTwainCapabilityInfoJS;
/**
* Returns information about TWAIN device capability.
* @param twainCapabilityId An integer value, which defines identifier of device capability.
* @param usageMode An instance of [see="WebTwainDeviceCapabilityUsageModeEnumJS"] class.
*/
getCapability(twainCapabilityId: number, usageMode: Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS): Vintasoft.Twain.WebTwainCapabilityInfoJS;
/**
* Returns information about TWAIN device capability.
* @param twainCapabilityId An instance of [see="WebDeviceCapabilityIdEnumJS"] class.
* @param usageMode An instance of [see="WebTwainDeviceCapabilityUsageModeEnumJS"] class.
*/
getCapability(twainCapabilityId: Vintasoft.Twain.WebDeviceCapabilityIdEnumJS, usageMode: Vintasoft.Twain.WebTwainDeviceCapabilityUsageModeEnumJS): Vintasoft.Twain.WebTwainCapabilityInfoJS;
/**
* Sends an asynchronous request to get value of TWAIN device capability.
* @param twainCapabilityId An integer value, which defines identifier of TWAIN device capability.
* @param usageMode An integer value, which defines usage mode of device capability.
* @param successFunc A function that will be executed if request is executed successfully. Function prototype: "successFunc(twainDevice, capInfos)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'capInfo' parameter is an array that contains information about TWAIN device capability.
* @param 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.
*/
getCapabilityAsync(twainCapabilityId: number, usageMode: number, successFunc: Function, errorFunc: Function): void;
/**
* Sends an asynchronous request to get value of TWAIN device capability.
* @param twainCapabilityId An instance of WebDeviceCapabilityIdEnumJS class that defines identifier of TWAIN device capability.
* @param usageMode An integer value, which defines usage mode of device capability.
* @param successFunc A function that will be executed if request is executed successfully. Function prototype: "successFunc(twainDevice, capInfos)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'capInfo' parameter is an array that contains information about TWAIN device capability.
* @param 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.
*/