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/SANE/eSCL image scanner in Windows and Linux. Developed web applications can be used in all major web b
1,431 lines (1,118 loc) • 101 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 WebTwainAcquireModalStateEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available reduction methods for bit depth loss.
*/
class WebTwainBitDepthReductionModeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available modes that defines how the internal scanner buffer must be cleared.
*/
class WebTwainClearBufferModeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available duplex modes.
*/
class WebTwainDuplexModeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available image filters.
*/
class WebTwainImageFilterEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies how the batch job must be processed.
*/
class WebTwainJobControlEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available light paths.
*/
class WebTwainLightPathEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available color characteristic of the light sources used to acquire the image.
*/
class WebTwainLightSourceEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available noise filter algorithms.
*/
class WebTwainNoiseFilterEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available methods of image size detection.
*/
class WebTwainPageAutoSizeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available page orientations.
*/
class WebTwainPageOrientationEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available page sizes.
*/
class WebTwainPageSizeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available pixel flavors for black-white images.
*/
class WebTwainPixelFlavorEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available pixel types.
*/
class WebTwainPixelTypeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available transfer modes.
*/
class WebTwainTransferModeEnumJS 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 WebTwainUnitOfMeasureEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available identifiers of device capabilities.
*/
class WebTwainDeviceCapabilityIdEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available country codes for TWAIN device.
*/
class WebTwainCountryCodeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available languages for TWAIN device.
*/
class WebTwainLanguageTypeEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available scan input sources for eSCL device.
*/
class WebEsclScanInputSourceEnumJS extends Vintasoft.Shared.WebEnumItemBaseJS {
constructor(value: string);
}
/**
* Specifies available scan color modes for eSCL device.
*/
class WebEsclScanColorModeEnumJS 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.WebTwainUnitOfMeasureEnumJS"].
* @param top Value of the top-most edge of the rectangle, in [see="Vintasoft.Twain.WebTwainUnitOfMeasureEnumJS"].
* @param right Value of the right-most edge of the rectangle, in [see="Vintasoft.Twain.WebTwainUnitOfMeasureEnumJS"].
* @param bottom Value of the bottom-most edge of the rectangle, in [see="Vintasoft.Twain.WebTwainUnitOfMeasureEnumJS"].
*/
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/eSCL 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.WebTwainCountryCodeEnumJS;
/**
* Sets the country code, which must be used by TWAIN device manager.
* @param value An instance of [see="WebTwainCountryCodeEnumJS"] class that defines the country code. Default value is "USA".
*/
set_CountryCode(value: Vintasoft.Twain.WebTwainCountryCodeEnumJS): void;
/**
* Gets the language, which must be used by TWAIN device manager.
*/
get_LanguageType(): Vintasoft.Twain.WebTwainLanguageTypeEnumJS;
/**
* Sets the language, which must be used by TWAIN device manager.
* @param value An instance of [see="WebTwainLanguageTypeEnumJS"] class that defines the language. Default value is "English".
*/
set_LanguageType(value: Vintasoft.Twain.WebTwainLanguageTypeEnumJS): 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/eSCL 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/eSCL devices installed in the system.
*/
get_Devices(): Vintasoft.Twain.WebTwainDeviceJS[];
/**
* Gets the default TWAIN/SANE/eSCL device.
*/
get_DefaultDevice(): Vintasoft.Twain.WebTwainDeviceJS;
/**
* Opens TWAIN/SANE/eSCL 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/eSCL 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/eSCL device manager.
*/
close(): void;
/**
* Sends an asynchronous request to close TWAIN/SANE/eSCL 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/eSCL 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/eSCL device by device name.
* @param deviceName The name of TWAIN/SANE/eSCL 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.WebTwainDuplexModeEnumJS;
/**
* 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/eSCL 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 TWAIN device.
*/
get_IsTwain(): boolean;
/**
* Gets a value indicating whether device is SANE device.
*/
get_IsSane(): boolean;
/**
* Gets a value indicating whether device is eSCL device.
*/
get_IsEscl(): 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.WebTwainBitDepthReductionModeEnumJS;
/**
* Sets bit depth reduction mode of images for current scan session.
* @param value An instance of [see="WebTwainBitDepthReductionModeEnumJS"] class.
*/
set_BitDepthReductionMode(value: Vintasoft.Twain.WebTwainBitDepthReductionModeEnumJS): 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="WebTwainClearBufferModeEnumJS"] class.
*/
set_ClearBuffers(value: Vintasoft.Twain.WebTwainClearBufferModeEnumJS): 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.WebTwainImageFilterEnumJS;
/**
* Sets image filter for current scan session.
* @param value An instance of [see="WebTwainImageFilterEnumJS"] class.
*/
set_ImageFilter(value: Vintasoft.Twain.WebTwainImageFilterEnumJS): void;
/**
* Gets a value that defines how the batch job must be processed.
*/
get_JobControl(): Vintasoft.Twain.WebTwainJobControlEnumJS;
/**
* Sets a value that defines how the batch job must be processed.
* @param value An instance of [see="WebTwainJobControlEnumJS"] class.
*/
set_JobControl(value: Vintasoft.Twain.WebTwainJobControlEnumJS): 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.WebTwainLightPathEnumJS;
/**
* Sets the light path, which must be used for the image capturing.
* @param value An instance of [see="WebTwainLightPathEnumJS"] class.
*/
set_LightPath(value: Vintasoft.Twain.WebTwainLightPathEnumJS): void;
/**
* Gets a value that defines general color characteristic of the light source for current scan session.
*/
get_LightSource(): Vintasoft.Twain.WebTwainLightSourceEnumJS;
/**
* Sets a value that defines general color characteristic of the light source for current scan session.
* @param value An instance of [see="WebTwainLightSourceEnumJS"] class.
*/
set_LightSource(value: Vintasoft.Twain.WebTwainLightSourceEnumJS): 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.WebTwainNoiseFilterEnumJS;
/**
* Sets the noise filter for current scan session.
* @param value An instance of [see="WebTwainNoiseFilterEnumJS"] class.
*/
set_NoiseFilter(value: Vintasoft.Twain.WebTwainNoiseFilterEnumJS): 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.WebTwainPageAutoSizeEnumJS;
/**
* Sets the page size detection mode for current scan session.
* @param value An instance of [see="WebTwainPageAutoSizeEnumJS"] class.
*/
set_PageAutoSize(value: Vintasoft.Twain.WebTwainPageAutoSizeEnumJS): void;
/**
* Gets orientation of images for current scan session.
*/
get_PageOrientation(): Vintasoft.Twain.WebTwainPageOrientationEnumJS;
/**
* Sets orientation of images for current scan session.
* @param value An instance of [see="WebTwainPageOrientationEnumJS"] class.
*/
set_PageOrientation(value: Vintasoft.Twain.WebTwainPageOrientationEnumJS): void;
/**
* Gets page size for current scan session.
*/
get_PageSize(): Vintasoft.Twain.WebTwainPageSizeEnumJS;
/**
* Sets page size for current scan session.
* @param value An instance of [see="WebTwainPageSizeEnumJS"] class.
*/
set_PageSize(value: Vintasoft.Twain.WebTwainPageSizeEnumJS): void;
/**
* Gets pixel flavor for current scan session.
*/
get_PixelFlavor(): Vintasoft.Twain.WebTwainPixelFlavorEnumJS;
/**
* Sets pixel flavor for current scan session.
* @param value An instance of [see="WebTwainPixelFlavorEnumJS"] class.
*/
set_PixelFlavor(value: Vintasoft.Twain.WebTwainPixelFlavorEnumJS): void;
/**
* Gets pixel type of images for current scan session.
*/
get_PixelType(): Vintasoft.Twain.WebTwainPixelTypeEnumJS;
/**
* Sets pixel type of images for current scan session.
* @param value An instance of [see="WebTwainPixelTypeEnumJS"] class.
*/
set_PixelType(value: Vintasoft.Twain.WebTwainPixelTypeEnumJS): 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.WebTwainTransferModeEnumJS;
/**
* Sets transfer mode for current scan session.
* @param value An instance of [see="WebTwainTransferModeEnumJS"] class.
*/
set_TransferMode(value: Vintasoft.Twain.WebTwainTransferModeEnumJS): void;
/**
* Gets unit of measure for current scan session.
*/
get_UnitOfMeasure(): Vintasoft.Twain.WebTwainUnitOfMeasureEnumJS;
/**
* Sets unit of measure for current scan session.
* @param value An instance of [see="Vintasoft.Twain.WebTwainUnitOfMeasureEnumJS"] class.
*/
set_UnitOfMeasure(value: Vintasoft.Twain.WebTwainUnitOfMeasureEnumJS): 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;
/**
* Gets the scan input source for eSCL device.
*/
get_EsclScanInputSource(): Vintasoft.Twain.WebEsclScanInputSourceEnumJS;
/**
* Sets the scan input source for eSCL device.
* @param value The scan input source for eSCL device.
*/
set_EsclScanInputSource(value: Vintasoft.Twain.WebEsclScanInputSourceEnumJS): void;
/**
* Gets the scan intent for eSCL device.
*/
get_EsclScanIntent(): string;
/**
* Sets the scan intent for eSCL device.
* @param value The scan intent for eSCL device.
*/
set_EsclScanIntent(value: string): void;
/**
* Gets the scan color mode for eSCL device.
*/
get_EsclScanColorMode(): Vintasoft.Twain.WebEsclScanColorModeEnumJS;
/**
* Sets the scan color mode for eSCL device.
* @param value The scan color mode for eSCL device.
*/
set_EsclScanColorMode(value: Vintasoft.Twain.WebEsclScanColorModeEnumJS): void;
/**
* Gets the scan resolution for eSCL device.
*/
get_EsclScanResolution(): number;
/**
* Sets the scan resolution for eSCL device.
* @param value The scan resolution for eSCL device.
*/
set_EsclScanResolution(value: number): void;
// METHODS
/**
* Opens TWAIN/SANE/eSCL 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/eSCL 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;
/**
* Opens TWAIN/SANE/eSCL device (device will not show UI but will show progress indicator during image scan process).
*/
open(): void;
/**
* Sends an asynchronous request to open TWAIN/SANE/eSCL 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/eSCL device.
*/
close(): void;
/**
* Sends an asynchronous request to close TWAIN/SANE/eSCL 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/eSCL 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/eSCL 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/eSCL 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/eSCL 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="WebTwainDeviceCapabilityIdEnumJS"] class.
* @param usageMode An integer value, which defines usage mode of device capability.
*/
getCapability(twainCapabilityId: Vintasoft.Twain.WebTwainDeviceCapabilityIdEnumJS, usageMode: number): Vintasoft.Twain.WebTwainCapabilityInfoJS;
/**
* Returns information about TWAIN device capability.
* @param twainCapabilityId An integer value, which defines identifier