[dwt] A major upgrade from version 15 to version 16 (#45907)

* remove old files before add new ones

* adding v16 definitions

* remove unnecessary file

* fixing parsing bug

* add license file

* fix error

* remove package.json

* no I in interface names

* more bug fixes

* fixing errors

* more errors

* remaining erros

* fix bug

* re submit

* fix test error

* fix test error

* change version number from 16.0 to 16.0.0 to match that of dwt

* must use major.minor for version, no patch version

* fix a wrong Enum
This commit is contained in:
Tom Kent 2020-07-09 04:00:24 +08:00 committed by GitHub
parent 535948083a
commit bb2735dd73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 6696 additions and 6033 deletions

168
types/dwt/Addon.BarcodeReader.d.ts vendored Normal file
View File

@ -0,0 +1,168 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
export interface BarcodeReader {
/**
* Read an image in the buffer and try to locate and decode barcode(s) on it.
* @param index Specify the image to decode.
*/
decode(index: number): Promise<TextResults>;
/**
* Return the current runtime settings or the settings of the specified built-in template.
* @param template Specify a built-in template.
*/
getRuntimeSettings(template?: string): Promise<RuntimeSettings>;
/**
* Set up the barcode reader with advanced settings.
* @param settings The runtime setting in the form of a string.
*/
initRuntimeSettingsWithString(settings: string): Promise<RuntimeSettings>;
/**
* Update the runtime settings with a given object or use the string "speed", "balance", or "coverage" to use our preset settings. The default setting is "coverage".
* @param settings Specify the runtime settings.
*/
updateRuntimeSettings(settings: RuntimeSettings): Promise<RuntimeSettings>;
/**
* Reset all runtime settings to default values.
*/
resetRuntimeSettings(): Promise<RuntimeSettings>;
}
export interface TextResults extends Array<any> {
[index: number]: TextResult;
description?: string;
exception?: number;
imageid?: number;
}
export interface TextResult {
/**
* Barcode result content in a byte array.
*/
barcodeBytes: number[];
/**
* The barcode format.
*/
barcodeFormat: Dynamsoft.EnumBarcodeFormat | number;
/**
* Extra barcde formats.
*/
barcodeFormat_2: Dynamsoft.EnumBarcodeFormat_2 | number;
/**
* Barcode formats as a string.
*/
barcodeFormatString: string;
/**
* Extra barcode formats as a string.
*/
barcodeFormatString_2: string;
/**
* The barcode result text.
*/
barcodeText: string;
/**
* Detailed result information.
*/
detailedResult: any;
/**
* The corresponding localization result.
*/
localizationResult: LocalizationResult;
/**
* Other information
*/
results: Result[];
}
export interface LocalizationResult {
/**
* The angle of a barcode. Values range from 0 to 360.
*/
angle: number;
/**
* The X coordinate of the left-most point.
*/
x1: number;
/**
* The X coordinate of the second point in a clockwise direction.
*/
x2: number;
/**
* The X coordinate of the third point in a clockwise direction.
*/
x3: number;
/**
* The X coordinate of the fourth point in a clockwise direction.
*/
x4: number;
/**
* The Y coordinate of the left-most point.
*/
y1: number;
/**
* The Y coordinate of the second point in a clockwise direction.
*/
y2: number;
/**
* The Y coordinate of the third point in a clockwise direction.
*/
y3: number;
/**
* The Y coordinate of the fourth point in a clockwise direction.
*/
y4: number;
moduleSize: number;
pageNumber: number;
regionName: number;
resultCoordinateType: number;
terminatePhase: number;
}
export interface Result {
accompanyingTextBytes: number[];
clarity: number;
confidence: number;
deformation: number;
resultType: number;
}
export interface RuntimeSettings {
barcodeFormatIds: number;
barcodeFormatIds_2: number;
binarizationModes: number[];
deblurLevel: number;
expectedBarcodesCount: number;
furtherModes: FurtherModes;
intermediateResultSavingMode: number;
intermediateResultTypes: number;
localizationModes: number[];
maxAlgorithmThreadCount: number;
minBarcodeTextLength: number;
minResultConfidence: number;
pdfRasterDPI: number;
pdfReadingMode: number;
region: Region;
resultCoordinateType: number;
returnBarcodeZoneClarity: number;
scaleDownThreshold: number;
scaleUpModes: number[];
terminatePhase: number;
textResultOrderModes: number[];
timeout: number;
}
export interface FurtherModes {
accompanyingTextRecognitionModes: number[];
barcodeColourModes: number[];
barcodeComplementModes: number[];
colourClusteringModes: number[];
colourConversionModes: number[];
deformationResistingModes: number[];
dpmCodeReadingModes: number[];
grayscaleTransformationModes: number[];
imagePreprocessingModes: number[];
regionPredetectionModes: number[];
textAssistedCorrectionMode: number;
textFilterModes: number[];
textureDetectionModes: number[];
}
export interface Region {
regionBottom: number;
regionLeft: number;
regionMeasuredByPercentage: number;
regionRight: number;
regionTop: number;
}

264
types/dwt/Addon.OCR.d.ts vendored Normal file
View File

@ -0,0 +1,264 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
export interface OCR {
/**
* Download and install the OCR add-on on the local system.
* @param path The URL to download the add-on (typically a ZIP file).
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Download(
path: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Return whether the OCR engine has been installed.
*/
IsModuleInstalled(): boolean;
/**
* Download and install an OCR language package.
* @param path The URL to download the package (typically a ZIP file).
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
DownloadLangData(
path: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Return whether the output uses the fonts detected by the OCR system or the default/provided ones. Only valid when the result format is PDF.
*/
GetIfUseDetectedFont(): boolean;
/**
* Set whether the output uses the fonts detected by the OCR system or the default/provided ones. Only valid when the result format is PDF.
* @param value Whether to use or not the detected font.
*/
SetIfUseDetectedFont(value: boolean): boolean;
/**
* Return the font size base to apply higher-level regional accurate OCR.
*/
GetMinFontSizeforMoreAccurateResult(): number;
/**
* Set the font size base to apply higher-level regional accurate OCR.
* @param size Specify the size.
*/
SetMinFontSizeforMoreAccurateResult(size: number): number;
/**
* Return the font name for OCR. Only valid when the output format is PDF.
*/
GetUnicodeFontName(): string;
/**
* Set the font name for OCR. Only valid when the output format is PDF.
* @param name Specify a font to be used for the OCR.
*/
SetUnicodeFontName(name: string): boolean;
/**
* Configure the OCR operation.
* @param language Specify the target language.
*/
SetLanguage(language: Dynamsoft.EnumDWT_OCRLanguage | string): boolean;
/**
* Configure the OCR operation.
* @param format Specify the output format.
*/
SetOutputFormat(format: Dynamsoft.EnumDWT_OCROutputFormat | number): boolean;
/**
* Configure the OCR operation.
* @param mode Specify the OCR page layout analysis mode.
*/
SetPageSetMode(mode: Dynamsoft.EnumDWT_OCRPageSetMode | number): boolean;
/**
* Perform OCR on the specified image in the buffer.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument imageId The imageId of the image which can be used to find the index.
* @argument result The OCR result.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Recognize(
index: number,
successCallback: (
imageId: number,
result: OCRResult
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Perform OCR on the specified local file.
* @param path Specify a local file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument path The file path.
* @argument result The OCR result.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RecognizeFile(path: string,
successCallback: (
path: string,
result: OCRResult
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Perform OCR on the specified rectangular area on the image.
* @param index Specify the image.
* @param left Specify the rectangle (leftmost coordinate).
* @param top Specify the rectangle (topmost coordinate).
* @param right Specify the rectangle (rightmost coordinate).
* @param bottom Specify the rectangle (bottommost coordinate).
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument imageId The imageId of the image which can be used to find the index.
* @argument result The OCR result.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RecognizeRect(
index: number,
left: number,
top: number,
right: number,
bottom: number,
successCallback: (
imageId: number,
left: number,
top: number,
right: number,
bottom: number,
result: OCRResult
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Perform OCR on the selected images in the buffer.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument result The OCR result.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RecognizeSelectedImages(
successCallback: (
result: OCRResult
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
}
export interface OCRResult {
/**
* Return a base64 string that contains the result of the OCR.
* Newlines are represented by the newline character: '\n'.
*/
Get(): string;
/**
* Return the error code.
*/
GetErrorCode(): number;
/**
* Return the error string.
*/
GetErrorString(): string;
/**
* Return the output format.
*/
GetFormat(): number;
/**
* Return the source information. It could be the index of the OCR'd image or the path of the OCR'd file.
*/
GetInput(): number | string;
/**
* Save the OCR result as a file.
* @param path The path to save the file.
*/
Save(path: string): boolean;
/**
* Return the number of pagesets in the OCR result.
*/
GetPageSetCount(): number;
/**
* Return the content of a pageset.
* @param index Specify the pageset
*/
GetPageSetContent(index: number): PageSet;
}
export interface PageSet {
/**
* Return the number of pages in the pageset.
*/
GetPageCount(): number;
/**
* Return the content of the specified page.
* @index Specify the page.
*/
GetPageContent(index: number): Page;
}
export interface Page {
/**
* Return the number of lines in the page.
*/
GetLineCount(): number;
/**
* Return the content of the specified line.
* @index Specify the line.
*/
GetLineContent(index: number): Line;
}
export interface Line {
/**
* Return the number of words in the line.
*/
GetWordCount(): number;
/**
* Return the coordinates for the rectangle that contains the specified line. The coordinates are in the sequence of "left,top,right,bottom" like "121,125,892,143".
*/
GetLineRect(): string;
/**
* Return the content of the specified word.
* @index Specify the word.
*/
GetWordContent(index: number): Word;
}
export interface Word {
/**
* Return the font name/size of the word.
*/
GetFontName(): string;
GetFontSize(): number;
/**
* Return the text of the word.
*/
GetText(): string;
/**
* Return the coordinates for the rectangle that contains the specified word. The coordinates are in the sequence of "left,top,right,bottom" like "121,126,157,139".
* @index Specify the word.
*/
GetWordRect(index: number): string;
}

251
types/dwt/Addon.OCRPro.d.ts vendored Normal file
View File

@ -0,0 +1,251 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
export interface OCRPro {
/**
* Download and install the OCR Professional add-on on the local system.
* @param path The URL to download the add-on (typically a ZIP file).
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Download(
path: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Return whether the OCR Professional engine has been installed.
*/
IsModuleInstalled(): boolean;
/**
* Perform OCR on the specified image in the buffer.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument imageId The imageId of the image which can be used to find the index.
* @argument result The OCR result.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Recognize(
index: number,
successCallback: (
imageId: number,
result: OCRProResult
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Perform OCR on the specified local file.
* @param path Specify a local file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument path The file path.
* @argument result The OCR result.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RecognizeFile(path: string,
successCallback: (
path: string,
result: OCRProResult
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Perform OCR on the specified rectangular area(s) on the image.
* @param index Specify the image.
* @param aryRects Specify the rectangle(s).
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument imageId The imageId of the image which can be used to find the index.
* @argument result The OCR result.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RecognizeRect(
index: number,
aryRects: Rect[],
successCallback: (
imageId: number,
aryRects: Rect[],
result: OCRProResult
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Perform OCR on the selected images in the buffer.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument result The OCR result.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RecognizeSelectedImages(
successCallback: (
result: OCRProResult
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Return or set the current settings of the OCR engine.
*/
Settings: Settings | boolean | null;
}
export interface Rect {
left: number;
right: number;
top: number;
bottom: number;
}
export interface OCRProResult {
/**
* Return a base64 string that contains the result of the OCR.
*/
Get(): string;
/**
* Return the error code.
*/
GetErrorCode(): number;
/**
* Return an array which contains detailed error information for each page that was OCR'd
*/
GetErrorDetailList(): Error[];
/**
* Return the error string.
*/
GetErrorString(): string;
/**
* Return the source information. It could be the index of the OCR'd image or the path of the OCR'd file.
*/
GetInput(): number | string;
/**
* Return the number of pages already OCR'd on the machine.
*/
GetAlreadyOCRCount(): string;
/**
* Return the number of pages allowed by the current license.
*/
GetOCRTotalCount(): string;
/**
* Return the number of pages in the OCR result.
*/
GetPageCount(): string;
/**
* Return the content of a page.
* @param index Specify the page
*/
GetPageContent(index: number): Page;
/**
* Save the OCR result as a file.
* @param path The path to save the file.
*/
Save(path: string): boolean;
}
export interface Error {
/**
* Return the index of the image or path of the file.
*/
GetInput(): number | string;
/**
* Return the error message.
*/
GetMessage(): string;
/**
* Return the number of the page on which the error was thrown.
* If the input is a file, this returns the index of the page in that file.
* If the input is an image in the buffer, this always returns 0.
*/
GetPage(): number;
}
export interface Page {
/**
* Return the number of letters in the page.
*/
GetLetterCount(): number;
/**
* Return the content of the specified letter.
* @index Specify the letter.
*/
GetLetterContent(index: number): Letter;
/**
* Return the number of recognized rectangles in the page.
*/
GetZoneCount(): number;
/**
* Return the base64-encoded content of the specified rectangle.
* @index Specify the line.
*/
GetZoneContent(index: number): string;
}
export interface Letter {
/**
* Return the text of the letter.
*/
GetText(): number;
/**
* Return the coordinates for the rectangle that contains the specified letter. The coordinates are in the sequence of "left,top,right,bottom" like "121,125,123,143".
*/
GetLetterRect(): string;
}
export interface Settings {
/**
* Specify the target language.
*/
Languages: string;
/**
* Specify the URL for the license checker.
*/
LicenseChecker: string;
/**
* Specify the output format.
*/
OutputFormat: Dynamsoft.EnumDWT_OCRProOutputFormat | string;
/**
* Specify the PDF/A version.
*/
PDFAVersion: Dynamsoft.EnumDWT_OCRProPDFAVersion | string;
/**
* Specify the PDF version.
*/
PDFVersion: Dynamsoft.EnumDWT_OCRProPDFVersion | string;
/**
* Specify the recognition module.
*/
RecognitionModule: Dynamsoft.EnumDWT_OCRProRecognitionModule | string;
/**
* Configure the redaction.
*/
Redaction: Redaction;
}
export interface Redaction {
/**
* Specify the text to redact.
*/
FindText: string;
/**
* Specify how the text is found.
*/
FindTextFlags: Dynamsoft.EnumDWT_OCRFindTextFlags | number;
/**
* Specify how redaction is done.
*/
FindTextAction: Dynamsoft.EnumDWT_OCRFindTextAction | number;
}

110
types/dwt/Addon.PDF.d.ts vendored Normal file
View File

@ -0,0 +1,110 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
export interface PDF {
/**
* Convert the specified PDF file to image(s).
* @param path The path of the PDF file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
ConvertToImage(
path: string,
resolution: number,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Return the convert mode.
*/
GetConvertMode(): number;
/**
* Return whether the PDF module has been installed.
*/
IsModuleInstalled(): boolean;
/**
* Detect whether a local PDF file is text based or not.
* @path Specify the path of the PDF file.
*/
IsTextBasedPDF(path: string): boolean;
/**
* Set the convert mode.
* @param mode Specify the mode.
*/
SetConvertMode(mode: Dynamsoft.EnumDWT_ConvertMode | number): boolean;
/**
* Set the password for reading encrypted PDF files.
* @param password Specify the password.
*/
SetPassword(password: string): boolean;
/**
* Set the resolution for rasterizing.
* @param resolution Specify the resolution.
*/
SetResolution(resolution: number): boolean;
/**
* Set up the PDF writing engine.
*/
Write: Write;
}
export interface Write {
/**
* Set up the PDF writing engine.
* @param settings Configures how the PDF is generated.
*/
Setup(settings: PDFWSetting): void;
}
export interface PDFWSetting {
/**
* Specify the author.
*/
author: string;
/**
* Specify the compression type.
*/
compression: Dynamsoft.EnumDWT_PDFCompressionType | number;
/**
* Specify the creator.
*/
creator: string;
/**
* Specify the creation date.
* Note that the argument should start with 'D:' like 'D:20181231'.
*/
creationDate: string;
/**
* Specify the key words.
*/
keyWords: string;
/**
* Specify the modified date.
* Note that the argument should start with 'D:' like 'D:20181231'.
*/
modifiedDate: string;
/**
* Specify the producer.
*/
producer: string;
/**
* Specify the subject.
*/
subject: string;
/**
* Specify the title.
*/
title: string;
/**
* Specify the PDF version. For example, '1.5'.
*/
version: string;
/**
* Specify the quality of the images in the file.
* The value ranges from 0 to 100.
* Only valid when the {compression} is 'JPEG' or 'JPEG2000'.
*/
quality: number;
}

257
types/dwt/Addon.Webcam.d.ts vendored Normal file
View File

@ -0,0 +1,257 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
import { WebTwain } from "./WebTwain";
export interface Webcam {
/**
* Return whether the Webcam module has been installed.
*/
IsModuleInstalled(): boolean;
/**
* Capture an image from the current camera.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error String
*/
CaptureImage(
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Return a list of all available cameras.
*/
GetSourceList(): string[];
/**
* Select a camera to use.
* @param name Specify the camera.
*/
SelectSource(name: string): boolean;
/**
* Close the current camera.
*/
CloseSource(): boolean;
/**
* Start to play the video stream from the current camera.
* @param DWObject Specify a WebTwain instance to show the video.
* @param quality Specify the quality of the video.
* @param frameDidShow A callback function that is triggered after each video frame is shown.
*/
PlayVideo(
DWObject: WebTwain,
quality: number,
frameDidShow?: () => void
): boolean;
/**
* Pause the video.
*/
PauseVideo(): boolean;
/**
* Stop the video.
*/
StopVideo(): boolean;
/**
* Return information about the specified camera property.
* @param property Specify the property.
*/
GetCameraControlPropertySetting(
property: Dynamsoft.EnumDWT_CameraControlProperty | number
): CameraControlProperty;
/**
* Return detailed information about the specified camera property.
* @param property Specify the property.
*/
GetCameraControlPropertyMoreSetting(
property: Dynamsoft.EnumDWT_CameraControlProperty | number
): CameraControlPropertyExtra;
/**
* Set the specified camera property.
* @param property Specify the property.
* @param value Specify the value.
* @param auto Specify whether the propery should change automatically.
*/
SetCameraControlPropertySetting(
property: Dynamsoft.EnumDWT_CameraControlProperty | number,
value: number,
auto: boolean
): boolean;
/**
* Return information about the specified video property.
* @param property Specify the property.
*/
GetVideoPropertySetting(
property: Dynamsoft.EnumDWT_VideoProperty | number
): VideoControlProperty;
/**
* Return detailed information about the specified video property.
* @param property Specify the property.
*/
GetVideoPropertyMoreSetting(
property: Dynamsoft.EnumDWT_VideoProperty | number
): VideoControlPropertyExtra;
/**
* Set the specified video property.
* @param property Specify the property.
* @param value Specify the value.
* @param auto Specify whether the propery should change automatically.
*/
SetVideoPropertySetting(
property: Dynamsoft.EnumDWT_VideoProperty | number,
value: number,
auto: boolean
): boolean;
/**
* Return the frame rates supported by the current camera.
*/
GetFrameRate(): FrameRate;
/**
* Return the media types supported by the current camera.
*/
GetMediaType(): MediaType;
/**
* Return the resolutions supported by the current camera.
*/
GetResolution(): Resolution;
/**
* Set the frame rate.
* @param rate Specify the frame rate.
*/
SetFrameRate(rate: number): boolean;
/**
* Set the media type.
* @param type Sepcify the media type.
*/
SetMediaType(type: string): boolean;
/**
* Set the resolution.
* @param resolution Specify the resolution.
*/
SetResolution(resolution: string): boolean;
/**
* Rotate the video.
* @param mode Specify the rotate mode
*/
SetVideoRotateMode(
mode: Dynamsoft.EnumDWT_VideoRotateMode | number
): boolean;
/**
* Return the URL (http(s)://) for the latest frame.
*/
GetFrameURL(): string;
/**
* Return the internal URL (dwt://) for the latest frame.
*/
GetFramePartURL(): string;
}
export interface FrameRate {
/**
* Return the number of available frame rates.
*/
GetCount(): number;
/**
* Return the specified frame rate.
*/
Get(index: number): number;
/**
* Return the current frame rate.
*/
GetCurrent(): number;
}
export interface MediaType {
/**
* Return the number of available media types.
*/
GetCount(): number;
/**
* Return the specified media type.
*/
Get(index: number): string;
/**
* Return the current media type.
*/
GetCurrent(): string;
/**
* internal use
*/
_resultlist: any;
}
export interface Resolution {
/**
* Return the number of available resolutions.
*/
GetCount(): number;
/**
* Return the specified resolution.
*/
Get(index: number): string;
/**
* Return the current resolution.
*/
GetCurrent(): string;
}
export interface VideoControlProperty {
/**
* Return the value of the property.
*/
GetValue(): number;
/**
* Return whether the property is set autmatically or not.
*/
GetIfAuto(): boolean;
}
export interface VideoControlPropertyExtra {
/**
* Return the minimum value of the property.
*/
GetMinValue(): number;
/**
* Return the maximum value of the property.
*/
GetMaxValue(): number;
/**
* Return the default value of the property.
*/
GetDefaultValue(): number;
/**
* Return the smallest increment by which the property can change.
*/
GetSteppingDelta(): number;
/**
* Return whether the property is set autmatically or not.
*/
GetIfAuto(): boolean;
}
export interface CameraControlProperty {
/**
* Return the value of the property.
*/
GetValue(): number;
/**
* Return whether the property is set autmatically or not.
*/
GetIfAuto(): boolean;
}
export interface CameraControlPropertyExtra {
/**
* Return the minimum value of the property.
*/
GetMinValue(): number;
/**
* Return the maximum value of the property.
*/
GetMaxValue(): number;
/**
* Return the default value of the property.
*/
GetDefaultValue(): number;
/**
* Return the smallest increment by which the property can change.
*/
GetSteppingDelta(): number;
/**
* Return whether the property is set autmatically or not.
*/
GetIfAuto(): boolean;
}

1630
types/dwt/Dynamsoft.Enum.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

130
types/dwt/Dynamsoft.FileUploader.d.ts vendored Normal file
View File

@ -0,0 +1,130 @@
export interface FileUploader {
/**
* Initialize and create a FileUploader instance.
* @param URL Specify a path to retrieve the FileUploader library.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument uploadManager A FileUploader instance.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Init(
URL: string,
successCallback: (
uploadManager: UploadManager
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
}
export interface UploadManager {
/**
* Create an upload job.
*/
CreateJob(): Job;
/**
* Start uploading (processing the specified job).
* @param job Specify the job.
*/
Run(job: Job): boolean;
/**
* Cancel a job.
* @param job Specify the job.
*/
Cancel(job: Job): boolean;
/**
* Cancel all jobs.
*/
CancelAllUpload(): boolean;
}
export interface Job {
/**
* Specify the block size (in bytes). By default, it's 10240.
*/
BlockSize: number;
/**
* Specify the file name.
*/
FileName: string;
/**
* Specify the fields in the HTTP Post Form.
*/
FormField: FormField;
/**
* Specify custom HTTP Post request headers.
* Example: job.HttpHeader["Content-Type"] = "text/plain";
*/
HttpHeader: object;
/**
* Return the Http version.
*/
readonly HttpVersion: string;
/**
* A callback triggered when the job succeeds.
* @argument job Specify the job.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
OnRunFailure: (
job: Job,
errorCode: number,
errorString: string
) => void;
/**
* A callback triggered when the job succeeds.
* @argument job Specify the job.
*/
OnRunSuccess: (job: Job) => void;
/**
* A callback triggered multiple times during the upload.
* @argument job Specify the job.
* @argument percentage Return the percentage.
*/
OnUploadTransferPercentage: (
job: Job,
percentage: number
) => void;
/**
* Specify the URL of the script to receive the upload.
*/
ServerUrl: string;
/**
* Specify the main content of the job, i.e. the file(s).
*/
SourceValue: SourceValue;
/**
* Specify the number of threads (<=4) for the upload.
*/
ThreadNum: number;
/**
* Return the version of the job.
*/
readonly Version: number;
}
export interface SourceValue {
/**
* Specify the block size. By default, it's 10240.
* @param source A URL to specify the content of the file.
* Normally it's generated by {GenerateURLForUploadData()}
* @param name Specify the name of the file.
* @param key Specify the key of the file in the request. This key can be used to retrieve the file content in server-side scripts.
*/
Add: (
source: string,
name: string,
key?: string
) => void;
}
export interface FormField {
/**
* Specify the block size. By default, it's 10240.
* @param key Specify the key of the field.
* @param value Sepcify the value of the field.
*/
Add: (
key: string,
value: string
) => void;
}

4300
types/dwt/Dynamsoft.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@ -2,15 +2,13 @@
> `npm install --save @types/dwt`
# Summary
This package contains type definitions for DWT and its add-ons(http://www.dynamsoft.com/Products/WebTWAIN_Overview.aspx).
This package contains type definitions for [dwt](https://www.npmjs.com/package/dwt). Check out more on its [official site](https://www.dynamsoft.com/products/webtwain_overview.aspx).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dwt
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dwt.
Additional Details
* Last updated: 07 Jan 2020 09:05:12 GMT
* Dependencies: none
* Global values: dynamsoft, Dynamsoft, EnumDWT_BorderStyle, EnumDWT_Cap, EnumDWT_CapBitOrder, EnumDWT_CapBitdepthReduction, EnumDWT_CapFeederAlignment, EnumDWT_CapFeederOrder, EnumDWT_CapFilterType, EnumDWT_CapFlash, EnumDWT_CapFlipRotation, EnumDWT_CapImageFilter, EnumDWT_CapLanguage, EnumDWT_CapLightPath, EnumDWT_CapLightSource, EnumDWT_CapNoiseFilter, EnumDWT_CapORientation, EnumDWT_CapOverscan, EnumDWT_CapPixelFlavor, EnumDWT_CapPlanarChunky, EnumDWT_CapPrinter, EnumDWT_CapPrinterMode, EnumDWT_CapSupportedSizes, EnumDWT_CapType, EnumDWT_CapValueType, EnumDWT_ConverMode, EnumDWT_ConvertMode, EnumDWT_DUPLEX, EnumDWT_DataSourceStatus, EnumDWT_Error, EnumDWT_FileFormat, EnumDWT_FitWindowType, EnumDWT_ImageType, EnumDWT_InitMsg, EnumDWT_InterpolationMethod, EnumDWT_Language, EnumDWT_MagType, EnumDWT_MessageType, EnumDWT_MouseShape, EnumDWT_PDFCompressionType, EnumDWT_PixelType, EnumDWT_PlatformType, EnumDWT_ShowMode, EnumDWT_TIFFCompressionType, EnumDWT_TransferMode, EnumDWT_UnitType, EnumDWT_UploadDataFormat, etc.
### Additional Details
* Last updated: Tue, 7 July 2020 20:38:11 GMT
# Credits
These definitions were written by Xiao Ling <https://github.com/yushulx>, Josh Hall <https://github.com/jbh>, Lincoln Hu <https://github.com/lincoln2018>, Tom Kent <https://github.com/Tom-Dynamsoft>.
These definitions were written by [Xiao Ling](https://github.com/yushulx), [Josh Hall](https://github.com/jbh), [Lincoln Hu](https://github.com/lincoln2018), [Tom Kent](https://github.com/Tom-Dynamsoft), and [Dave Sueltenfuss](https://github.com/dsueltenfuss).

1022
types/dwt/WebTwain.Acquire.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

253
types/dwt/WebTwain.Buffer.d.ts vendored Normal file
View File

@ -0,0 +1,253 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
import { WebTwainIO } from "./WebTwain.IO";
export interface WebTwainBuffer extends WebTwainIO {
/**
* Return the current deviation of the pixels in the image.
*/
readonly BlankImageCurrentStdDev: number;
/**
* Return or set the standard deviation of the pixels in the image.
*/
BlankImageMaxStdDev: number;
/**
* Return or set the dividing line between black and white. The default value is 128.
*/
BlankImageThreshold: number;
/**
* Return or set how much physical memory is allowed for storing images currently loaded in Dynamic Web TWAIN. Once the limit is reached, images will be cached on the hard disk.
*/
BufferMemoryLimit: number;
/**
* Remove all tags from the specified image.
* @param index Specify the image.
*/
ClearImageTags(index: number): boolean;
/**
* Return or set the current index of image in the buffer.
*/
CurrentImageIndexInBuffer: number;
/**
* Filter images by the specified tag.
* @param tag The tag used as the filter.
*/
FilterImagesByTag(tag: string): boolean;
/**
* Return the pixel bit depth of the specified image.
* @param index Specify the image.
*/
GetImageBitDepth(index: number): number;
/**
* Return the height (in pixels) of the specified image.
* @param index Specify the image.
*/
GetImageHeight(index: number): number;
/**
* Return the internal URL of the specified image. If width and height are not specified,
* you get the original image, otherwise you get the image with specified width or height
* while keeping the same aspect ratio. The returned string is like this
* 'dwt://dwt_trial_13000404/img?id=306159652&index=0&t=1502184632022'.
* @param index Specify the image.
* @param width the width of the image, it must be 150 or bigger
* @param height the height of the image, it must be 150 or bigger
*/
GetImagePartURL(index: number, width?: number, height?: number): string;
/**
* Calculate the size in bytes of the specified image assuming it's resized to the given dimensions.
* @param index Specify the image.
* @param width Specify the width.
* @param height Specify the height.
*/
GetImageSize(index: number, width: number, height: number): number;
/**
* Calculate the size in bytes of the specified image assuming an expected file type.
* @param index Specify the image.
* @param type Sepcify the expected file type.
*/
GetImageSizeWithSpecifiedType(index: number, type: Dynamsoft.EnumDWT_ImageType | number): number;
/**
* Return the direct URL of the specified image, if width or height is set to -1,
* you get the original image, otherwise you get the image with specified width or
* height while keeping the same aspect ratio.
* @param index Specify the image.
* @param width Specify the width.
* @param height Specify the height.
*/
GetImageURL(index: number, width?: number, height?: number): string;
/**
* Return the width (in pixels) of the specified image.
* @param index Specify the image.
*/
GetImageWidth(index: number): number;
/**
* Return the horizontal resolution of the specified image.
* @param index Specify the image.
*/
GetImageXResolution(index: number): number;
/**
* Return the vertical resolution of the specified image.
* @param index Specify the image.
*/
GetImageYResolution(index: number): number;
/**
* [Deprecation] Return an index from the selected indices array. Read SelectedImagesIndices instead.
* [Alternative] Read SelectedImagesIndices instead.
* @param indexOfIndices Specify the index of the specified image.
*/
GetSelectedImageIndex(indexOfIndices: number): number;
/**
* Calculate the size in bytes of all selected images assuming an expected file type.
* @param type Sepcify the expected file type.
*/
GetSelectedImagesSize(type: Dynamsoft.EnumDWT_ImageType | number): number;
/**
* Return the skew angle of the specified image.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument angle The skew angle.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
GetSkewAngle(
index: number,
successCallback?: (
angle: number) => void,
failureCallback?: (
errorCode: number,
errorString: string) => void
): number | void;
/**
* Return the skew angle of the specified rectangle on the specified image.
* @param index Specify the image.
* @param left The x-coordinate of the upper-left corner of the rectangle.
* @param top The y-coordinate of the upper-left corner of the rectangle.
* @param right The x-coordinate of the lower-right corner of the rectangle.
* @param bottom The y-coordinate of the lower-right corner of the rectangle.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument angle The skew angle.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
GetSkewAngleEx(
index: number,
left: number,
top: number,
right: number,
bottom: number,
successCallback?: (
angle: number) => void,
failureCallback?: (
errorCode: number,
errorString: string) => void
): number | void;
/**
* Return how many images are held in the buffer
*/
readonly HowManyImagesInBuffer: number;
/**
* Return or set whether the feature of disk caching is enabled.
*/
IfAllowLocalCache: boolean;
/**
* Return the imageId of an image specified by the index.
* @param index The index of the image.
*/
IndexToImageID(index: number): number;
/**
* Return the index of an image specified by the imageId.
* @param imageId The imageId of the image.
*/
ImageIDToIndex(imageId: number): number;
/**
* Check whether the specified image is blank.
* @param index Specify the image.
*/
IsBlankImage(index: number): boolean;
/**
* [Deprecation] Detect whether a certain area on an image is blank.
* [Alternative] Use IsBlankImage or IsBlankImageExpress instead.
* @param index Specify the image.
* @param left The x-coordinate of the upper-left corner of the rectangle.
* @param top The y-coordinate of the upper-left corner of the rectangle.
* @param right The x-coordinate of the lower-right corner of the rectangle.
* @param bottom The y-coordinate of the lower-right corner of the rectangle.
* @param bFuzzyMatch Specify whether use fuzzy matching when detecting.
*/
IsBlankImageEx(index: number, left: number, top: number, right: number, bottom: number, bFuzzyMatch: boolean): boolean;
/**
* Check whether the specified image is blank.
* @param index Specify the image.
*/
IsBlankImageExpress(index: number): boolean;
/**
* Return or set how many images can be held in the buffer.
*/
MaxImagesInBuffer: number;
/**
* Change the position of an image in the buffer.
* @param from Specify the original position by index.
* @param to Specify the target position by index.
*/
MoveImage(from: number, to: number): boolean;
/**
* Remove all images in the buffer.
*/
RemoveAllImages(): boolean;
/**
* Remove the selected images in the buffer.
*/
RemoveAllSelectedImages(): boolean;
/**
* Remove the specified image.
* @param index Specify the image.
*/
RemoveImage(index: number): boolean;
/**
* Select all images and return the indices.
*/
SelectAllImages(): number[];
/**
* [Deprecation] Return how many images are selected.
* [Alternative] Read the length of SelectedImagesIndices instead.
*/
readonly SelectedImagesCount: number;
/**
* Return the indices of the selected images.
*/
readonly SelectedImagesIndices: number[];
/**
* Select the specified images.
* @param indices Specify one or multiple images.
*/
SelectImages(indices: number[]): boolean;
/**
* Specify a aspect ratio to be used when selecting a rectangle on an image.
*/
SelectionRectAspectRatio: number;
/**
* Set a default tag for newlay acquired images.
* @param tag Specifies the tag.
*/
SetDefaultTag(tag: string): boolean;
/**
* [Deprecation] You can use the method to select images programatically.
* [Alternative] Use SelectImages() or SelectAllImages() instead.
* @param indexOfIndices The index of an array that holds the indices of selected images.
* @param index The index of an image that you want to select.
*/
SetSelectedImageIndex(indexOfIndices: number, index: number): boolean;
/**
* Exchange the positions of two images.
* @param index1 Specify the 1st image.
* @param index2 Specify the 2nd image.
*/
SwitchImage(index1: number, index2: number): boolean;
/**
* Add a tag to specified images.
* @param indices Specifies images to be tagged.
* @param tag Specify the tag.
*/
TagImages(indices: number[], tag: string): boolean;
}

434
types/dwt/WebTwain.Edit.d.ts vendored Normal file
View File

@ -0,0 +1,434 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
import { WebTwainBuffer } from "./WebTwain.Buffer";
export interface WebTwainEdit extends WebTwainBuffer {
/**
* Show the built-in image editor. If called without any arguments while the editor is open, it'll close the editor.
* @param divId Specify a div element to hold the editor.
* @param width Specify the width of the editor.
* @param height Specify the height of the editor.
*/
ShowImageEditor(
divId?: string,
width?: number,
height?: number
): boolean;
/**
* Change the bit depth of the specified image.
* @param index Specify the image.
* @param bitDepth Specify the bit depth.
* @param highQuality Whether to keep high quality.
*/
ChangeBitDepth(
index: number,
bitDepth: number,
highQuality: boolean,
): boolean;
/**
* Change the size of the specified image.
* @param index Specify the image.
* @param width Specify the new width.
* @param height Specify the new height.
* @param method Specify the algorithm for the change.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
ChangeImageSize(
index: number,
width: number,
height: number,
method: Dynamsoft.EnumDWT_InterpolationMethod | number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Change the DPI (dots per inch) of the specified image.
* @param index Specify the image.
* @param xResolution Specify the horizontal DPI.
* @param yResolution Specify the vertical DPI.
* @param resample Whether to resample the image.
* @param method Specify the algorithm for the change.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SetDPI(
index: number,
xResolution: number,
yResolution: number,
resample: boolean,
method: Dynamsoft.EnumDWT_InterpolationMethod | number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Convert the specified image to black & white.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
ConvertToBW(
index: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Convert the specified image to grayscale.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
ConvertToGrayScale(
index: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Invert the colour of the pixels on the specified image.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Invert(
index: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Change the width of the specified image by adding a margin or removing part of the image.
* @param index Specify the image.
* @param width Specify the new width.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SetImageWidth(
index: number,
width: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Flip the specified image.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Flip(
index: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Mirror the specified image.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Mirror(
index: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Rotate the specified image 90 degrees counterclockwise.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RotateLeft(
index: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Rotate the specified image 90 degrees clockwise.
* @param index Specify the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RotateRight(
index: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Rotate the specified image by the specified angle.
* @param index Specify the image.
* @param angle Specify the angle.
* @param keepSize Whether to keep the original size.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Rotate(
index: number,
angle: number,
keepSize: boolean,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Rotate the specified image by the specified angle.
* @param index Specify the image.
* @param angle Specify the angle.
* @param keepSize Whether to keep the original size.
* @param method Specify the algorithm for the change.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
RotateEx(
index: number,
angle: number,
keepSize: boolean,
method: Dynamsoft.EnumDWT_InterpolationMethod | number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Crop the specified image using the specified coordinates.
* @param index Specify the image.
* @param left Specify the rectangle (leftmost coordinate).
* @param top Specify the rectangle (topmost coordinate).
* @param right Specify the rectangle (rightmost coordinate).
* @param bottom Specify the rectangle (bottommost coordinate).
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Crop(
index: number,
left: number,
top: number,
right: number,
bottom: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Erase a rectangular area from the specified image.
* @param index Specify the image.
* @param left Specify the rectangle (leftmost coordinate).
* @param top Specify the rectangle (topmost coordinate).
* @param right Specify the rectangle (rightmost coordinate).
* @param bottom Specify the rectangle (bottommost coordinate).
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
Erase(
index: number,
left: number,
top: number,
right: number,
bottom: number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string
) => void
): void | boolean;
/**
* Copy the specified image to the clipboard of the operating system.
* @param index Specify the image.
*/
CopyToClipboard(index: number): boolean;
/**
* Cut the specified image to the clipboard of the operating system.
* @param index Specify the image.
*/
CutToClipboard(index: number): boolean;
/**
* Crop a rectangular area from the specified image to the clipboard of the operating system.
* @param index Specify the image.
* @param left Specify the rectangle (leftmost coordinate).
* @param top Specify the rectangle (topmost coordinate).
* @param right Specify the rectangle (rightmost coordinate).
* @param bottom Specify the rectangle (bottommost coordinate).
*/
CropToClipboard(
index: number,
left: number,
top: number,
right: number,
bottom: number
): boolean;
/**
* Cut a rectangular area from the specified image to the clipboard of the operating system.
* @param index Specify the image.
* @param left Specify the rectangle (leftmost coordinate).
* @param top Specify the rectangle (topmost coordinate).
* @param right Specify the rectangle (rightmost coordinate).
* @param bottom Specify the rectangle (bottommost coordinate).
*/
CutFrameToClipboard(
index: number,
left: number,
top: number,
right: number,
bottom: number
): boolean;
/**
* Return or set the fill colour for the empty area on an image that has been cut/cropped/erased.
*/
BackgroundFillColor: number;
/**
* [Deprecation] Add text on an image.
* [Alternative] Annotation feature to be added in a later version.
* @param index the index of the image that you want to add text to.
* @param x the x coordinate for the text.
* @param y the y coordinate for the text.
* @param text the content of the text that you want to add.
* @param txtColor the color for the text.
* @param backgroundColor the background color.
* @param backgroundRoundRadius ranging from 0 to 0.5. Please NOTE that MAC version does not support this parameter.
* @param backgroundOpacity specifies the opacity of the background of the added text, it ranges from 0 to 1.0. Please NOTE that Mac version only supports value 0 and 1
*/
AddText(
index: number,
x: number,
y: number,
text: string,
txtColor: number,
backgroundColor: number,
backgroundRoundRadius: number,
backgroundOpacity: number
): boolean;
/**
* [Deprecation] Create the font for adding text using the method AddText.
* [Alternative] Annotation feature to be added in a later version.
* @param height Specifies the desired height (in logical units) of the font.
* The absolute value of nHeight must not exceed 16,384 device units after it is converted.
* For all height comparisons, the font mapper looks for the largest font that does not
* exceed the requested size or the smallest font if all the fonts exceed the requested size.
* @param width Specifies the average width (in logical units) of characters in the font.
* If Width is 0, the aspect ratio of the device will be matched against the digitization
* aspect ratio of the available fonts to find the closest match, which is determined by the
* absolute value of the difference.
* @param escapement Specifies the angle (in 0.1-degree units) between the escapement vector
* and the x-axis of the display surface. The escapement vector is the line through the origins
* of the first and last characters on a line. The angle is measured counterclockwise from the x-axis.
* @param orientation Specifies the angle (in 0.1-degree units) between the baseline of a character
* and the x-axis.The angle is measured counterclockwise from the x-axis for coordinate systems
* in which the y-direction is down and clockwise from the x-axis for coordinate systems in which
* the y-direction is up.
* @param weight Specifies the font weight (in inked pixels per 1000). The described valuesare
* approximate; the actual appearance depends on the typeface. Some fonts haveonly FW_NORMAL,
* FW_REGULAR, and FW_BOLD weights. If FW_DONTCARE is specified, a default weight is used.
* @param italic Specifies an italic font if set to TRUE.
* @param underline Specifies an underlined font if set to TRUE.
* @param strikeOut A strikeout font if set to TRUE.
* @param charSet Specifies the font's character set. The OEM character set is system-dependent.
* Fonts with other character sets may exist in the system. An application that uses a font with
* an unknown character set must not attempt to translate or interpret strings that are to be
* rendered with that font.
* @param outputPrecision Specifies the desired output precision. The output precision defines
* how closely the output must match the requested font's height, width, character orientation,
* escapement, and pitch.
* @param clipPrecision Specifies the desired clipping precision. The clipping precision defines
* how to clip characters that are partially outside the clipping region.
* @param quality Specifies the font's output quality, which defines how carefully the GDI must
* attempt to match the logical-font attributes to those of an actual physical font.
* @param pitchAndFamily The pitch and family of the font.
* @param faceName The typeface name, the length of this string must not exceed 32 characters,
* including the terminating null character.
*/
CreateTextFont(
height: number,
width: number,
escapement: number,
orientation: number,
weight: number,
italic: number,
underline: number,
strikeOut: number,
charSet: number,
outputPrecision: number,
clipPrecision: number,
quality: number,
pitchAndFamily: number,
faceName: string
): boolean;
/**
* [Deprecation] Decorates image of a specified index in buffer with rectangles of transparent color.
* [Alternative] Annotation feature to be added in a later version.
* @param index specifies the index of image in buffer. The index is 0-based.
* @param left Specify the rectangle (leftmost coordinate).
* @param top Specify the rectangle (topmost coordinate).
* @param right Specify the rectangle (rightmost coordinate).
* @param bottom Specify the rectangle (bottommost coordinate).
* @param color Specifies the fill color of the rectangle. The byte-ordering of the RGB value is 0xBBGGRR. BB represents blue, GG represents green, RR represents red.
* @param fOpacity Specifies the opacity of the rectangle. The value represents opacity. 1.0 is 100% opaque and 0.0 is totally transparent.
*/
OverlayRectangle(
index: number,
left: number,
top: number,
right: number,
bottom: number,
color: number,
fOpacity: number
): boolean;
}

951
types/dwt/WebTwain.IO.d.ts vendored Normal file
View File

@ -0,0 +1,951 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
import { WebTwainUtil } from "./WebTwain.Util";
export interface WebTwainIO extends WebTwainUtil {
/**
* The password to connect to the FTP.
*/
FTPPassword: string;
/**
* The port to connect to the FTP.
*/
FTPPort: number;
/**
* The password to connect to the FTP.
*/
FTPUserName: string;
/**
* Return or set whether to use passive mode when connect to the FTP.
*/
IfPASVMode: boolean;
/**
* Return or set the field name for the uploaded file.
* By default, it's "RemoteFile".
*/
HttpFieldNameOfUploadedImage: string;
/**
* [Deprecation] Return or set the password used to log into the HTTP server.
*/
HTTPPassword: string;
/**
* [Deprecation] Return or set the user name used to log into the HTTP server.
*/
HTTPUserName: string;
/**
* Return or set the HTTP Port.
*/
HTTPPort: number;
/**
* Return or set whether to use SSL in HTTP requests.
*/
IfSSL: boolean;
/**
* Return the response string of the latest HTTP Post request.
*/
readonly HTTPPostResponseString: string;
/**
* Return or set whether to show open/save file dialog when saving images in the buffer or loading images from a local directory.
*/
IfShowFileDialog: boolean;
/**
* Return or set whether to show the progress of an operation with a button to cancel it.
*/
IfShowCancelDialogWhenImageTransfer: boolean;
/**
* Return or set whether to show the progressbar.
*/
IfShowProgressBar: boolean;
/**
* Return or set the quality for JPEG compression.
* The values range from 0 to 100.
*/
JPEGQuality: number;
/**
* Return or set whether to insert or append images when they are scanned/loaded.
*/
IfAppendImage: boolean;
/**
* Return or set whether to append to or replace an existing TIFF file with the same name.
*/
IfTiffMultiPage: boolean;
/**
* Return or set the compression type for TIFF files.
*/
TIFFCompressionType: Dynamsoft.EnumDWT_TIFFCompressionType | number;
/**
* Return or set the name of the person who creates the PDF document.
*/
PDFAuthor: string;
/**
* Return or set the compression type of PDF files. This is a runtime property.
*/
PDFCompressionType: Dynamsoft.EnumDWT_PDFCompressionType;
/**
* Return or set the date when the PDF document is created.
*/
PDFCreationDate: string;
/**
* Return or set the name of the application that created the original document, if the PDF document is converted from another form.
*/
PDFCreator: string;
/**
* Return or set the keywords associated with the PDF document.
*/
PDFKeywords: string;
/**
* Return or set the date when the PDF document is last modified.
*/
PDFModifiedDate: string;
/**
* Return or set the name of the application that converted the PDF document from its native.
*/
PDFProducer: string;
/**
* Return or set the subject of the PDF document.
*/
PDFSubject: string;
/**
* Return or set the title of the PDF document.
*/
PDFTitle: string;
/**
* Return or set the value of the PDF version.
*/
PDFVersion: string;
/**
* Clear all the custom fields from the HTTP Post Form.
*/
ClearAllHTTPFormField(): boolean;
/**
* Clear the content of all custom tiff tags.
*/
ClearTiffCustomTag(): boolean;
/**
* Convert the specified images to a base64 string.
* @param indices Specify one or multiple images.
* @param type The file type.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument result The resulting base64 string.
* @argument indices The indices of the converted images.
* @argument type The file type.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
ConvertToBase64(
indices: number[],
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback: (
result: Base64Result,
indices: number[],
type: number) => void,
failureCallBack: (
errorCode: number,
errorString: string) => void
): void;
/**
* Convert the specified images to a blob.
* @param indices Specify one or multiple images.
* @param type The file type.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument result The resulting blob.
* @argument indices The indices of the converted images.
* @argument type The file type.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
ConvertToBlob(
indices: number[],
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback: (
result: Blob,
indices: number[],
type: number) => void,
failureCallBack: (
errorCode: number,
errorString: string) => void
): void;
/**
* Download the specified file via FTP
* @param host The FTP Host.
* @param path Specify the file to download.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
FTPDownload(
host: string,
path: string,
successCallback: () => void,
failureCallBack: (
errorCode: number,
errorString: string) => void
): void;
/**
* Download the specified file via FTP.
* @param host The FTP Host.
* @param path Specify the file to download.
* @param type The format of the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
FTPDownloadEx(
host: string,
path: string,
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback: () => void,
failureCallBack: (
errorCode: number,
errorString: string) => void
): void;
/**
* Upload the specified image via FTP.
* @param host The FTP Host.
* @param index Specify the image.
* @param path The path to save the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
FTPUpload(
host: string,
index: number,
path: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Upload the specified image via FTP.
* @param host The FTP Host.
* @param index Specify the image.
* @param path The path to save the file.
* @param type The format of the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
FTPUploadEx(
host: string,
index: number,
path: string,
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Upload all images as a multi-page TIFF via FTP.
* @param host The FTP Host.
* @param path Specify the path to save the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
FTPUploadAllAsMultiPageTIFF(
host: string,
path: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Upload all images as a multi-page PDF via FTP.
* @param host The FTP Host.
* @param path Specify the path to save the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
FTPUploadAllAsPDF(
host: string,
path: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Upload selected images as a multi-page PDF via FTP.
* @param host The FTP Host.
* @param path Specify the path to save the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
FTPUploadAsMultiPagePDF(
host: string,
path: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Upload selected images as a multi-page TIFF via FTP.
* @param host The FTP Host.
* @param path Specify the path to save the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
FTPUploadAsMultiPageTIFF(
host: string,
path: string,
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Download the specified file via a HTTP Get request.
* @param host The HTTP Host.
* @param path Specify the path of the file to download.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
HTTPDownload(
host: string,
path: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Download the specified file via a HTTP Get request.
* @param host The HTTP Host.
* @param path Specify the path of the file to download.
* @param type The format of the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
HTTPDownloadEx(
host: string,
path: string,
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Download the specified file via a HTTP Post request.
* @param host The HTTP Host.
* @param path Specify the path of the file to download.
* @param type The format of the file.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPDownloadThroughPost(
host: string,
path: string,
type: Dynamsoft.EnumDWT_ImageType | number,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Download the specified file via a HTTP Get request.
* @param host The HTTP Host.
* @param path Specify the path of the file to download.
* @param localPath Specify where to save the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
HTTPDownloadDirectly(
host: string,
path: string,
localPath: string,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Upload the specified image(s) via a HTTP Post.
* @param URL The server-side script to receive the post.
* @param indices Specify the image(s).
* @param type The format of the file.
* @param dataFormat Whether to upload the file as binary or a base64 string.
* @param fileName The file name.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPUpload(
URL: string,
indices: number[],
type: Dynamsoft.EnumDWT_ImageType | number,
dataFormat: Dynamsoft.EnumDWT_UploadDataFormat | number,
fileName: string,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
HTTPUpload(
URL: string,
indices: number[],
type: Dynamsoft.EnumDWT_ImageType | number,
dataFormat: Dynamsoft.EnumDWT_UploadDataFormat | number,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
HTTPUpload(
URL: string,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Upload the specified image via a HTTP Put request.
* @param host The HTTP Host.
* @param index Specify the image.
* @param path Specify the path to put the file.
* @param type The format of the file.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
HTTPUploadThroughPutEx(
host: string,
index: number,
path: string,
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Upload the specified image via a HTTP Post request.
* @param host The HTTP Host.
* @param index Specify the image.
* @param target The target wherethe request is sent.
* @param type The format of the file.
* @param fileName The file name.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPUploadThroughPost(
host: string,
index: number,
target: string,
fileName: string,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Upload the specified image via a HTTP Post request.
* @param host The HTTP Host.
* @param index Specify the image.
* @param target The target wherethe request is sent.
* @param fileName The file name.
* @param type The format of the file.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPUploadThroughPostEx(
host: string,
index: number,
target: string,
fileName: string,
type: Dynamsoft.EnumDWT_ImageType | number,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Upload all images in the buffer as a TIFF file via a HTTP Post request.
* @param host The HTTP Host.
* @param target The target wherethe request is sent.
* @param fileName The file name.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPUploadAllThroughPostAsMultiPageTIFF(
host: string,
target: string,
fileName: string,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Upload all images in the buffer as a PDF file via a HTTP Post request.
* @param host The HTTP Host.
* @param target The target wherethe request is sent.
* @param fileName The file name.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPUploadAllThroughPostAsPDF(
host: string,
target: string,
fileName: string,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Upload all selected images in the buffer as a PDF file via a HTTP Post request.
* @param host The HTTP Host.
* @param target The target wherethe request is sent.
* @param fileName The file name.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPUploadThroughPostAsMultiPagePDF(
host: string,
target: string,
fileName: string,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Upload all selected images in the buffer as a TIFF file via a HTTP Post request.
* @param host The HTTP Host.
* @param target The target wherethe request is sent.
* @param fileName The file name.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPUploadThroughPostAsMultiPageTIFF(
host: string,
target: string,
fileName: string,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Upload the specified file via a HTTP Post request.
* @param host The HTTP Host.
* @param path Specify the file to upload.
* @param target The target wherethe request is sent.
* @param fileName The file name.
* @param onEmptyResponse A callback function that is executed if the response is empty.
* @param onServerReturnedSomething A callback function that is executed if the response is not empty.
* @argument errorCode The error code.
* @argument errorString The error string.
* @argument response The response string.
*/
HTTPUploadThroughPostDirectly(
host: string,
path: string,
target: string,
fileName: string,
onEmptyResponse: () => void,
onServerReturnedSomething: (
errorCode: number,
errorString: string,
response: string) => void
): void;
/**
* Load image(s) specified by its absolute path.
* @param fileName The path of the image to load.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
LoadImage(
fileName: string,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string) => void
): void | boolean;
/**
* Load image(s) specified by its absolute path.
* @param fileName The path of the image to load.
* @param type The format of the image.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
LoadImageEx(
fileName: string,
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string) => void
): void | boolean;
/**
* Load image(s) from a base64 string.
* @param imageData The image data which is a base64 string without the data URI scheme.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
LoadImageFromBase64Binary(
imageData: string,
imageType: Dynamsoft.EnumDWT_ImageType,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string) => void
): void | boolean;
/**
* Load image(s) from a binary object (Blob | ArrayBuffer).
* @param imageData The image data.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
LoadImageFromBinary(
imageData: Blob | ArrayBuffer,
successCallback: () => void,
failureCallback: (
errorCode: number,
errorString: string) => void
): void;
/**
* Load an image from the system clipboard. The image must be in DIB format.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
LoadDibFromClipboard(
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string) => void
): void | boolean;
/**
* [Deprecation] Return or set how many threads can be used when you upload files through POST.
*/
MaxInternetTransferThreads: number;
/**
* Return or set the maximum allowed size of a file to upload (in bytes).
*/
MaxUploadImageSize: number;
/**
* Export all image data in the buffer to a new browser window and use the browser's built-in print feature to print the image(s).
* @param useOSPrintWindow Whether to use the print feature of the operating system instead.
*/
Print(useOSPrintWindow?: boolean): boolean;
/**
* Save the specified image as a BMP file.
* @param fileName The name to save to.
* @param index The index which specifies the image to save.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveAsBMP(
fileName: string,
index: number,
successCallback?: () => void,
failureCallback?: (errorCode: number, errorString: string) => void
): void | boolean;
/**
* Save the specified image as a JPEG file.
* @param fileName The name to save to.
* @param index The index which specifies the image to save.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveAsJPEG(
fileName: string,
index: number,
successCallback?: () => void,
failureCallback?: (errorCode: number, errorString: string) => void
): void | boolean;
/**
* Save the specified image as a PDF file.
* @param fileName The name to save to.
* @param index The index which specifies the image to save.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveAsPDF(
fileName: string,
index: number,
successCallback?: () => void,
failureCallback?: (errorCode: number, errorString: string) => void
): void | boolean;
/**
* Save the specified image as a PNG file.
* @param fileName The name to save to.
* @param index The index which specifies the image to save.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveAsPNG(
fileName: string,
index: number,
successCallback?: () => void,
failureCallback?: (errorCode: number, errorString: string) => void
): void | boolean;
/**
* Save the specified image as a TIFF file.
* @param fileName The name to save to.
* @param index The index which specifies the image to save.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveAsTIFF(
fileName: string,
index: number,
successCallback?: () => void,
failureCallback?: (errorCode: number, errorString: string) => void
): void | boolean;
/**
* Saves all the images in buffer as a multi-page TIFF file.
* @param fileName The name to save to.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveAllAsMultiPageTIFF(
fileName: string,
successCallback?: () => void,
failureCallback?: (errorCode: number, errorString: string) => void
): void | boolean;
/**
* Saves all the images in buffer as a multi-page PDF file.
* @param fileName The name to save to.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveAllAsPDF(
fileName: string,
successCallback?: () => void,
failureCallback?: (errorCode: number, errorString: string) => void
): void | boolean;
/**
* Saves all selected images in buffer as a multi-page PDF file.
* @param fileName The name to save to.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveSelectedImagesAsMultiPagePDF(
fileName: string,
successCallback?: () => void,
failureCallback?: (errorCode: number, errorString: string) => void
): void | boolean;
/**
* Saves all selected images in buffer as a multi-page TIFF file.
* @param fileName The name to save to.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveSelectedImagesAsMultiPageTIFF(
fileName: string,
successCallback?: () => void,
failureCallback?: (
errorCode: number,
errorString: string) => void
): void | boolean;
/**
* [Deprecation] Return an index from the selected indices array. Read SelectedImagesIndices instead.
* [Alternative] Read SelectedImagesIndices instead.
* @param indexOfIndices Specify the index of the specified image.
*/
SaveSelectedImagesToBase64Binary(indexOfIndices: number): number;
/**
* [Deprecation] Saves the selected images in the buffer to a base64 string.
* [Alternative] Use ConvertToBase64 instead.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument result The resulting array of strings.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
SaveSelectedImagesToBase64Binary(
successCallback?: (result: string[]) => void,
failureCallback?: (errorCode: number, errorString: string) => void
): string | boolean;
/**
* Add a custom field to the HTTP Post Form.
* @param name The name of the field.
* @param value The value of the field.
*/
SetHTTPFormField(
name: string,
value: string
): boolean;
/**
* Add a binary file to the HTTP Post Form.
* @param name The name of the field.
* @param content The content of the file.
* @param fileName The name of the file.
*/
SetHTTPFormField(
name: string,
content: Blob,
fileName?: string
): boolean;
/**
* Add a custom header to the HTTP Post Form.
* @param name The name of the field.
* @param value The value of the field.
*/
SetHTTPHeader(
name: string,
value: string
): boolean;
/**
* Clear the content of all custom tiff tags.
* @param id The id of the custom tag.
* @param content The content of the tag.
* @param useBase64Encoding Whether the content is encoded.
*/
SetTiffCustomTag(
id: number,
content: string,
useBase64Encoding: boolean
): boolean;
/**
* Set the segmentation threshold and segment size.
* @param threshold Specify the threshold (in MB).
* @param size Specify the segment size (in KB).
*/
SetUploadSegment(
threshold: number,
size: number
): boolean;
/**
* Show the system's save-file dialog or open-file dialog.
* @param isSave Whether to show a save-file dialog or an open-file dialog
* @param filter The filter pattern like "JPG | *.jpg".
* @param filterIndex The order of the filter. Normally, just put 0.
* @param defaultExtension Extension to be appended to the file name. Only valid in a save-file dialog
* @param initialDirectory The initial directory that the dialog opens.
* @param allowMultiSelect Whether or not multiple files can be selected at the same time. Only valid in an open-file dialog.
* @param showOverwritePrompt Whether or not a prompt shows up when saving a file may overwrite an existing file.
* @param flag If set to 0, bAllowMultiSelect and bShowOverwritePrompt will be effective. Otherwise, these two parameters are ignored.
*/
ShowFileDialog(
isSave: boolean,
filter: string,
filterIndex: number,
defaultExtension: string,
initialDirectory: string,
allowMultiSelect: boolean,
showOverwritePrompt: boolean,
flag: number
): boolean;
/**
* [Deprecation] Set a cookie string into the Http Header to be used when uploading scanned images through POST.
* @param cookie The cookie.
*/
SetCookie(cookie: string): boolean;
}
export interface Base64Result {
/**
* Return the length of the result string.
*/
getLength(): number;
/**
* Return part of the string.
* @param offset The starting position.
* @param length The length of the expected string.
*/
getData(offset: number, length: number): string;
/**
* Return the MD5 value of the result.
*/
getMD5(): string;
}
/**
* Details for each license
*/
export interface LicenseDetailItem {
readonly Browser: string;
readonly EnumLicenseType: string;
readonly ExpireDate: string;
readonly LicenseType: string;
readonly OS: string;
readonly Trial: string;
readonly Version: string;
}

78
types/dwt/WebTwain.Util.d.ts vendored Normal file
View File

@ -0,0 +1,78 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
export interface WebTwainUtil {
/**
* Return the error code.
*/
readonly ErrorCode: number;
/**
* Return the error string.
*/
readonly ErrorString: string;
/**
* Return or set the log level for debugging.
*/
LogLevel: number;
/**
* Manufacturer in the identity string of the Dynamic Web TWAIN library.
*/
readonly Manufacturer: string;
/**
* ProductFamily in the identity string of the Dynamic Web TWAIN library.
*/
readonly ProductFamily: string;
/**
* Return or set the ProductKey.
*/
ProductKey: string;
/**
* ProductName in the identity string of the Dynamic Web TWAIN library.
*/
readonly ProductName: string;
/**
* Generate a URL to be used by a FileUpoader instance to fetch the data to upload.
* @param indices Specify the images to upload.
* @param type Specify the file type.
* @param successCallback A callback function that is executed if the request succeeds.
* @param failureCallback A callback function that is executed if the request fails.
* @argument resultURL The generated URL.
* @argument indices The indices of the images.
* @argument type The file type.
*/
GenerateURLForUploadData(
indices: number[],
type: Dynamsoft.EnumDWT_ImageType | number,
successCallback: (
resultURL: string,
indices: number[],
type: Dynamsoft.EnumDWT_ImageType | number
) => void,
failureCallback: (
errorCode: number,
errorString: string
) => void
): void;
/**
* Specify an event listener for the specified built-in event.
* @param name Specify the event
* @param callback The event listener
*/
RegisterEvent(name: string, callback: (...arg: any[]) => void): boolean;
/**
* Set the language for the authorization dialogs.
* @param language Specify the language.
*/
SetLanguage(
language: Dynamsoft.EnumDWT_Language | number
): boolean;
/**
* Remove an event listener from the specified built-in event.
* @param name Specify the event
* @param callback The event listener
*/
UnregisterEvent(name: string, callback: () => void): boolean;
/**
* VersionInfo in the identity string of the Dynamic Web TWAIN library.
*/
readonly VersionInfo: string;
}

571
types/dwt/WebTwain.Viewer.d.ts vendored Normal file
View File

@ -0,0 +1,571 @@
import { WebTwainAcquire } from "./WebTwain.Acquire";
export interface WebTwainViewer extends WebTwainAcquire {
/**
* Create a Dynamsoft Viewer instance and bind it to the WebTwain instance.
* @param elementId Specify an HTML element to create the viewer.
* @param config Configuration of the viewer.
*/
BindViewer(
elementId: string,
config?: BasicViewerConfig
): boolean;
/**
* Update the viewer with the new configuration.
* @param config Configuration of the viewer.
*/
UpdateViewer(config: BasicViewerConfig): boolean;
/**
* Unbind and destroy the viewer.
*/
UnbindViewer(): boolean;
/**
* Return or set the background colour of the viewer.
*/
BackgroundColor: number;
/**
* Return or set the border colour for selected image(s).
*/
SelectionImageBorderColor: number;
/**
* Return or set how the image is fit in the viewer.
*/
FitWindowType: number;
/**
* Return or set the border colour for selected image(s).
*/
IfFitWindow: boolean;
/**
* Return or set the height of the viewer.
*/
Height: number | string;
/**
* Return or set the width of the viewer.
*/
Width: number | string;
/**
* Return the horizontal coordinate of the mouse.
*/
readonly MouseX: number;
/**
* Return the vertical coordinate of the mouse.
*/
readonly MouseY: number;
/**
* Return or set the shape of the cursor.
*/
MouseShape: boolean;
/**
* Return or set whether the thumbnails view scrolls when new images come in.
*/
IfAutoScroll: boolean;
/**
* Return or set whether to show the page numbers.
*/
ShowPageNumber: boolean;
/**
* Return or set the margin between images (in pixels).
*/
ImageMargin: number;
/**
* Return or set the zoom factor.
*/
Zoom: number;
Viewer: DynamsoftViewer;
}
export interface DynamsoftViewer {
/**
* Remove a built-in event handler.
* @param eventName Specify the event.
*/
off(eventName: string): boolean;
/**
* Set the view mode of the viewer.
* @param columns Specify the number of images per row.
* @param rows Specify the number of images per column.
*/
setViewMode(
columns: number,
rows: number
): boolean;
/**
* Select a rectangular area on the specified image.
* @param left Specify the rectangle (leftmost coordinate).
* @param top Specify the rectangle (topmost coordinate).
* @param width Specify the rectangle (the width).
* @param height Specify the rectangle (the height).
*/
setSelectedImageArea(
left: number,
top: number,
width: number,
height: number
): boolean;
/**
* Set the CSS class name of the specified button.
* @param name Specify the button.
* @param className Specify the CSS class name.
*/
setButtonClass(
name: string,
className: string
): boolean;
/**
* The mode of operation. Allowed values are 0(no selection, cursor is pointer), 1 (seleciton, cursor is crosshair)
*/
operationMode: number;
/**
* Return or set whether to show the footer of the viewer.
*/
showFooter: boolean;
/**
* Return or set whether to show the header of the viewer.
*/
showHeader: boolean;
/**
* Zoom in by 6/5.
*/
zoomIn(): boolean;
/**
* Zoom out by 5/6.
*/
zoomOut(): boolean;
/**
* Bind a custom element to the viewer to add extra features.
* @param Id Specify the element by its Id.
* @param priority Specify the importance of the element.
* @param fullScreen Whether to show the element full-screen.
*/
bindCustomElement(
Id: string,
priority: number,
fullScreen: boolean
): boolean;
/**
* Unbind a custom element from the viewer.
* @param Id Specify the element by its Id.
*/
unBindCustomElement(Id: string): boolean;
/**
* Show the custom element.
* @param name Specify the element by its Id.
*/
showCustomElement(Id: string): boolean;
/**
* Hide the custom element.
* @param name Specify the element by its Id.
*/
hideCustomElement(Id: string): boolean;
/**
* Show or hide the custom element.
* @param name Specify the element by its Id.
*/
toggleCustomElement(Id: string): boolean;
/**
* Whether to only show the thumbnails view.
*/
bOnlyShowThumbnailsView: boolean;
/**
* Set the shape of the cursor over the thumbnails view.
*/
cursorOverThumbnailsView: string;
/**
* Update the viewer with detailed configuration.
* @param config Specify the detailed configuration.
*/
updateUISettings(config: ViewerConfig): boolean;
}
export interface BasicViewerConfig {
/**
* Specify the size of the viewer.
*/
Height: number | string;
Width: number | string;
/**
* Set up the content view.
*/
view: ContentView;
}
export interface ContentView {
/**
* Whether to show the content view or not.
* If set to false, then only thumbnails view is shown.
*/
bShow: boolean;
/**
* Specify the width of the major content view.
*/
Width: number | string;
}
export interface ViewerConfig {
/**
* Specify which components are shown.
*/
component?: {
header?: boolean;
topMenu?: boolean;
asideMenu?: boolean;
bottomMenu?: boolean;
};
group?: {
global?: {
visibility?: boolean,
location?: string, // Example: 'header'
sequence?: number
},
tabName?: {
visibility?: boolean,
location?: string, // Example: 'header'
sequence?: number
},
viewerCorner?: {
visibility?: boolean,
location?: string, // Example: 'header'
sequence?: number
},
viewMenuBlock?: {
visibility?: boolean,
location?: string, // Example: 'topMenu'
sequence?: number
},
viewMenu?: {
visibility?: boolean,
location?: string, // Example: 'topMenu'
sequence?: number
},
topMenuRight?: {
visibility?: boolean,
location?: string, // Example: 'topMenu'
sequence?: number
},
pager?: {
visibility?: boolean,
location?: string, // Example: 'bottomMenu'
sequence?: number
},
viewChange?: {
visibility?: boolean,
location?: string, // Example: 'header'
sequence?: number
}
};
buttons?: {
// loadImage button
loadImage?: {
visibility?: boolean,
location?: string, // Example: 'viewerCorner'
iconClass?: string, // Example: 'icon-file'
sequence?: number,
onButtonClick?: string // Example: onLoadImage'
},
currentTab?: {
visibility?: boolean,
location?: string, // Example: 'tabName',
sequence?: number
},
// panelChange button (thumbnail, dir tree, tags)
panelChange?: {
visibility?: boolean,
location?: string, // Example: 'global'
iconClass?: string, // Example: 'icon-list'
sequence?: number,
onButtonClick?: string // Example: onPanelChange'
},
// readDirection change button (vertical ,horizontal)
readDirection?: {
visibility?: boolean,
location?: string, // Example: 'global'
iconClass?: string, // Example: 'icon-readType'
sequence?: number,
onButtonClick?: string // Example: onReadDirection'
},
// readDirection change button (vertical ,horizontal)
blank1?: {
visibility?: boolean,
location?: string, // Example: 'global'
sequence?: number
},
// flip button
flip?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-flip'
sequence?: number,
onButtonClick?: string // Example: onFlip'
},
// mirror button
mirror?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-mirror'
sequence?: number,
onButtonClick?: string // Example: onMirror'
},
// rotate button
rotate?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-rotateLeft'
sequence?: number,
onButtonClick?: string // Example: onRotate'
},
// rotateAll button
rotateAll?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-rotateAll'
sequence?: number,
onButtonClick?: string // Example: onRotateAll'
},
// crop button
crop?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-crop'
sequence?: 5,
onButtonClick?: string // Example: onCrop'
},
// wipe button
wipe?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-wipe'
sequence?: 6,
onButtonClick?: string // Example: onWipe'
},
// undo button
undo?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-undo'
sequence?: 7,
onButtonClick?: string // Example: onUndo'
},
// redo button
redo?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-redo'
sequence?: 8,
onButtonClick?: string // Example: onRedo'
},
// magnifyCanvas button
zoomIn?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-magnifyImage'
sequence?: 9,
onButtonClick?: string // Example: onZoomIn'
},
// shrinkCanvas button
zoomOut?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-shrinkImage'
sequence?: 10,
onButtonClick?: string // Example: onZoomOut'
},
// reset button
reset?: {
visibility?: boolean,
location?: string, // Example: 'viewMenu'
iconClass?: string, // Example: 'icon-reset'
sequence?: 11,
onButtonClick?: string // Example: onReset'
},
// remove button
remove?: {
visibility?: boolean,
location?: string, // Example: 'topMenuRight'
iconClass?: string, // Example: 'icon-delete'
sequence?: number,
onButtonClick?: string // Example: onRemove'
},
// print button
print?: {
visibility?: boolean,
location?: string, // Example: 'topMenuRight'
iconClass?: string, // Example: 'icon-print'
sequence?: number,
onButtonClick?: string // Example: onPrint'
},
// save button
save?: {
visibility?: boolean,
location?: string, // Example: 'topMenuRight'
iconClass?: string, // Example: 'icon-save'
sequence?: number,
onButtonClick?: string // Example: onSave'
},
// firstPage button
firstPage?: {
visibility?: boolean,
location?: string, // Example: 'pager'
iconClass?: string, // Example: 'icon-pageStart'
sequence?: number,
onButtonClick?: string // Example: onFirstPage'
},
// previousPage button
previousPage?: {
visibility?: boolean,
location?: string, // Example: 'pager'
iconClass?: string, // Example: 'icon-pagePre'
sequence?: number,
onButtonClick?: string // Example: onPreviousPage'
},
// pagination show
pagination?: {
visibility?: boolean,
location?: string, // Example: 'pager'
},
// nextPage button
nextPage?: {
visibility?: boolean,
location?: string, // Example: 'pager'
iconClass?: string, // Example: 'icon-pageNext'
sequence?: number,
onButtonClick?: string // Example: onNextPage'
},
// lastPage button
lastPage?: {
visibility?: boolean,
location?: string, // Example: 'pager'
iconClass?: string, // Example: 'icon-pageEnd'
sequence?: 5,
onButtonClick?: string // Example: onLastPage'
},
// autoFit button
autoFit?: {
visibility?: boolean,
location?: string, // Example: 'viewChange'
iconClass?: string, // Example: 'icon-autoFit'
sequence?: number,
onButtonClick?: string // Example: onAutoFit'
},
// fitHeight button
fitHeight?: {
visibility?: boolean,
location?: string, // Example: 'viewChange'
iconClass?: string, // Example: 'icon-fitHeight'
sequence?: number,
onButtonClick?: string // Example: onFitHeight'
},
// fitWidth button
fitWidth?: {
visibility?: boolean,
location?: string, // Example: 'viewChange'
iconClass?: string, // Example: 'icon-fitWidth'
sequence?: number,
onButtonClick?: string // Example: onFitWidth'
},
// fullScreenToWebPage button
fullPage?: {
visibility?: boolean,
location?: string, // Example: 'viewChange'
iconClass?: string, // Example: 'icon-fullWeb'
sequence?: number,
onButtonClick?: string // Example: onFullPage'
},
// fullScreenToDevice
fullScreen?: {
visibility?: boolean,
location?: string, // Example: 'viewChange'
iconClass?: string, // Example: 'icon-fullDevice'
sequence?: number,
onButtonClick?: string // Example: onFullScreen'
}
};
tipsConfig?: {
loadImage?: string, // Example 'loadImage'
panelChange?: string, // Example 'panelChange'
readDirection?: string, // Example 'readDirection'
flip?: string, // Example 'flip'
mirror?: string, // Example 'mirror'
rotate?: string, // Example 'rotate'
rotateAll?: string, // Example 'rotateAll'
crop?: string, // Example 'crop'
wipe?: string, // Example 'wipe'
undo?: string, // Example 'undo'
redo?: string, // Example 'redo'
zoomIn?: string, // Example 'zoomIn'
zoomOut?: string, // Example 'zoomOut'
reset?: string, // Example 'reset'
remove?: string, // Example 'remove'
print?: string, // Example 'print'
save?: string, // Example 'save'
firstPage?: string, // Example 'firstPage'
previousPage?: string, // Example 'previousPage'
pagination?: string, // Example 'pagination'
nextPage?: string, // Example 'nextPage'
lastPage?: string, // Example 'lastPage'
autoFit?: string, // Example 'fitWindow'
fitHeight?: string, // Example 'fitHeight'
fitWidth?: string, // Example 'fitWidth'
fullPage?: string, // Example 'fullPage'
fullScreen?: string, // Example 'fullScreen'
};
content?: {
visibility?: boolean,
besides?: {
visibility?: boolean,
sequence?: number
},
viewPort?: {
visibility?: boolean,
sequence?: number
},
allImage?: {
visibility?: boolean,
displayName?: string // Example: 'All Images'
}
};
thumbnail?: {
visibility?: boolean,
iconClass?: string // Example: 'icon-thumbnail'
selectedBorderColor?: string // Example: 'red'
selectedBackgroundColor?: string // Example: 'rgb(127, 133, 251)'
imageBackgroundColor?: string // Example: 'transparent'
imageBorderColor?: string // Example: 'gray'
hoverBackgroundColor?: string // Example: '#c4faf8'
hoverBorderColor?: string // Example: 'yellow'
blockBackgroundColor?: string // Example: 'pink'
backgroundColor?: string // Example: 'rgba(67, 66, 70, 1)'
imageSpace?: number, // Example: 10
showPageNumber?: boolean,
showThumbnailControl?: boolean,
mouseShape?: string // Example: 'pointer'
};
tree?: {
visibility?: boolean,
iconClass?: string // Example: 'icon-tree',
selectedColor?: string // Example: '#0000ff',
goToThumbnail?: boolean
};
tag?: {
visibility?: boolean,
iconClass?: string // Example: 'icon-tags',
selectedColor?: string // Example: '#0000ff',
goToThumbnail?: boolean,
displayMode?: string // Example: ''// icon or text
};
cropStyle?: {
ratios?: any, // Example [[1, 1], [3, 2], [4, 3], [5, 4], [7, 5], [16, 9]],
cropMask?: boolean,
cropBar?: boolean
};
buttonResize?: {
ifResize?: boolean,
maxSize?: number, // Example: 26,
minSize?: number, // Example: 14
};
skinColor?: {
topMenuBackground?: string // Example: '#000000'
asideBackground?: string // Example: '#ffffff'
canvasBackground?: string // Example: 'rgba(67,66,70,1)'
bottomMenuBackground?: string // Example: '#000000'
};
presetMode?: string; // Example: 'basic'
theme?: string; // Example: 'basic'
}

49
types/dwt/WebTwain.d.ts vendored Normal file
View File

@ -0,0 +1,49 @@
import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
import { WebTwainViewer } from "./WebTwain.Viewer";
import { BarcodeReader } from "./Addon.BarcodeReader";
import { OCR } from "./Addon.OCR";
import { OCRPro } from "./Addon.OCRPro";
import { PDF } from "./Addon.PDF";
import { Webcam } from "./Addon.Webcam";
export interface WebTwain extends WebTwainViewer {
/**
* Addons to WebTwain instances.
*/
Addon: Addon;
/**
* [Deprecation] This API is no longer needed.
*/
AllowMultiSelect: boolean;
/**
* [Deprecation] This API is no longer needed.
*/
AllowPluginAuthentication: boolean;
/**
* [Deprecation] This API is no longer needed.
*/
AsyncMode: boolean;
/**
* [Deprecation] This API is no longer needed.
*/
BorderStyle: Dynamsoft.EnumDWT_BorderStyle | number;
/**
* Return whether a WebTwain instance is ready to use.
*/
readonly bReady: boolean;
/**
* [Deprecation] This API is no longer needed.
*/
BrokerProcessType: number;
/**
* [Deprecation] This API is no longer needed.
*/
EnableInteractiveZoom: boolean;
}
export interface Addon {
BarcodeReader: BarcodeReader;
OCR: OCR;
OCRPro: OCRPro;
PDF: PDF;
Webcam: Webcam;
}

View File

@ -1,204 +0,0 @@
// tslint:disable:jsdoc-format
// tslint:disable:max-line-length
// tslint:disable:no-irregular-whitespace
/*!
* Product: Dynamsoft Web Twain
* Web Site: http://www.dynamsoft.com
*
* Copyright 2020, Dynamsoft Corporation
* Author: Dynamsoft Support Team
*/
declare enum EnumDWT_OCRLanguage {
OCRL_ENG = "eng",
OCRL_ARA = "ara",
OCRL_CHI_SIM = "chi_sim",
OCRL_CHI_TRA = "chi_tra",
OCRL_HIN = "hin",
OCRL_URD = "urd",
OCRL_SPA = "spa",
OCRL_FRA = "fra",
OCRL_MSA = "msa",
OCRL_IND = "ind",
OCRL_RUS = "rus",
OCRL_BEN = "ben",
OCRL_POR = "por",
OCRL_PAN = "pan",
OCRL_DEU = "deu",
OCRL_JPN = "jpn",
OCRL_FAS = "fas",
OCRL_SWA = "swa",
OCRL_JAV = "jav",
OCRL_TEL = "tel",
OCRL_TUR = "tur",
OCRL_KOR = "kor",
OCRL_MAR = "mar",
OCRL_TAM = "tam",
OCRL_VIE = "vie",
OCRL_ITA = "ita",
OCRL_THA = "tha"
}
declare enum EnumDWT_OCRPageSetMode {
OCRPSM_OSD_ONLY = 0,
PSM_AUTO_OSD = 1,
PSM_AUTO_ONLY = 2,
PSM_AUTO = 3,
PSM_SINGLE_COLUMN = 4,
PSM_SINGLE_BLOCK_VERT_TEXT = 5,
PSM_SINGLE_BLOCK = 6,
PSM_SINGLE_LINE = 7,
PSM_SINGLE_WORD = 8,
PSM_CIRCLE_WORD = 9,
PSM_SINGLE_CHAR = 10
}
declare enum EnumDWT_OCROutputFormat {
OCROF_TEXT = 0,
OCROF_PDFPLAINTEXT = 1,
OCROF_PDFIMAGEOVERTEXT = 2,
OCROF_PDFPLAINTEXT_PDFX = 3,
OCROF_PDFIMAGEOVERTEXT_PDFX = 4
}
/**
* @class
*/
interface OCR {
/**
* Downloads and installs the ocr add-on on the local system.
* @method Dynamsoft.WebTwain#Download
* @param {string} remoteFile specifies the value of which frame to get.
* @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess.
* @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure.
* @return {boolean}
*/
Download(remoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Downloads and deploys the OCR language package on the local system.
* @method Dynamsoft.WebTwain#DownloadLangData
* @param {string} remoteFile specifies the value of which frame to get.
* @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess.
* @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure.
* @return {boolean}
*/
DownloadLangData(remoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Performs OCR on a given image.
* @method Dynamsoft.WebTwain#Read
* @param {number} sImageIndex Specifies the index of the image.
* @param {function} AsyncSuccessFunc The function to call when OCR operation succeeds. Please refer to the function prototype OnOCRSuccess.
* @param {function} AsyncFailureFunc The function to call when OCR operation fails. Please refer to the function prototype OnOCRFailure.
* @return {boolean}
*/
Recognize(sImageIndex: number, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Peforms OCR on the given rectangle on a specified image.
* @method Dynamsoft.WebTwain#ReadRect
* @param {number} sImageIndex Specifies the index of the image.
* @param {number} left specifies the x-coordinate of the upper-left corner of the rectangle.
* @param {number} top specifies the y-coordinate of the upper-left corner of the rectangle.
* @param {number} right specifies the x-coordinate of the lower-right corner of the rectangle.
* @param {number} bottom specifies the y-coordinate of the lower-right corner of the rectangle.
* @param {function} AsyncSuccessFunc The function to call when OCR operation succeeds. Please refer to the function prototype OnOCRSuccess.
* @param {function} AsyncFailureFunc The function to call when OCR operation fails. Please refer to the function prototype OnOCRFailure.
* @return {boolean}
*/
RecognizeRect(sImageIndex: number, left: number, top: number, right: number, bottom: number, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Performs OCR on one or multiple specified local file(s) directly.
* @method Dynamsoft.WebTwain#Read
* @param {string} fileNames Specifies the local paths of the target files. If multiple files are given, they should be separated by the '|' character.
* @param {function} AsyncSuccessFunc The function to call when OCR operation succeeds. Please refer to the function prototype OnOCRSuccess.
* @param {function} AsyncFailureFunc The function to call when OCR operation fails. Please refer to the function prototype OnOCRFailure.
* @return {boolean}
*/
RecognizeFile(fileNames: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Performs OCR on the currently selected images in the buffer.
* @method Dynamsoft.WebTwain#Read
* @param {function} AsyncSuccessFunc The function to call when OCR operation succeeds. Please refer to the function prototype OnOCRSuccess.
* @param {function} AsyncFailureFunc The function to call when OCR operation fails. Please refer to the function prototype OnOCRFailure.
* @return {boolean}
*/
RecognizeSelectedImages(optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Specifies a font to be used by OCR when Addon.OCR.SetIfUseDetectedFont is set to false.
* @method Dynamsoft.WebTwain#SetUnicodeFontName
* @param {string} name Specifies a font to be used by
* @return {boolean}
*/
SetUnicodeFontName(name: string): void;
/**
* Returns the detected OCR font name.
* @method Dynamsoft.WebTwain#GetUnicodeFontName
* @return {string} Returns the detected OCR font name.
*/
GetUnicodeFontName(): void;
/**
* Determines whether PDF output should use the fonts detected by the OCR system, or the default/provided fonts instead.
* @method Dynamsoft.WebTwain#SetIfUseDetectedFont
* @param {boolean} bValue By default this is true, indicating detected fonts should be used. The detected fonts must exist on the user's system for this to be successful.
* @return {boolean}
*/
SetIfUseDetectedFont(bValue: boolean): void;
/**
* Returns whether PDF output should use the fonts detected by the OCR system, or the default/provided fonts instead.
* @method Dynamsoft.WebTwain#GetIfUseDetectedFont
* @return {boolean} Returns whether PDF output should use the fonts detected by the OCR system, or the default/provided fonts instead.
*/
GetIfUseDetectedFont(): void;
/**
* Applies higher-level accuracy of OCR to the area of the image where the font size is bigger than the value set here.
* @method Dynamsoft.WebTwain#SetIfUseDetectedFont
* @param {number} nValue Specifies the font size base to apply the higher-level accracy OCR. The default value is 0 which means no regional accurate OCR is performed.
* @return {boolean}
*/
SetMinFontSizeforMoreAccurateResult(nValue: number): void;
/**
* Returns the font size base to apply higher-level regional accarate OCR which is set through Addon.OCR.SetMinFontSizeforMoreAccurateResult.
* @method Dynamsoft.WebTwain#GetMinFontSizeforMoreAccurateResult
* @return {boolean} Returns the font size base to apply higher-level regional accarate OCR. If the return value is 0, it indicates no regional accurate OCR is performed.
*/
GetMinFontSizeforMoreAccurateResult(): void;
/**
* Sets the target language for OCR operations.
* @method Dynamsoft.WebTwain#SetLanguage
* @param {string} value Specifies the target language for OCR operation.
* @return {boolean}
*/
SetLanguage(value: string): void;
/**
* Sets the mode for OCR page layout analysis. Determines how pages are determined when processing OCR.
* @method Dynamsoft.WebTwain#SetPageSetMode
* @param {EnumDWT_OCRPageSetMode} value Specifies the OCR Page layout analysis mode.
* @return {boolean}
*/
SetPageSetMode(value: EnumDWT_OCRPageSetMode): void;
/**
* Sets the OCR result format. Determines whether the OCR output is in text or PDF format.
* @method Dynamsoft.WebTwain#SetOutputFormat
* @param {EnumDWT_OCROutputFormat} value Specifies the OCR result format.
* @return {boolean}
*/
SetOutputFormat(value: EnumDWT_OCROutputFormat): void;
}
interface DynamsoftWebTwainAddon {
OCR: OCR;
}

View File

@ -1,174 +0,0 @@
// tslint:disable:jsdoc-format
// tslint:disable:max-line-length
// tslint:disable:no-irregular-whitespace
/*!
* Product: Dynamsoft Web Twain
* Web Site: http://www.dynamsoft.com
*
* Copyright 2020, Dynamsoft Corporation
* Author: Dynamsoft Support Team
*/
interface Redaction {
FindText: string;
FindTextFlags: EnumDWT_OCRFindTextFlags.OCRFT_WHOLEWORD;
FindTextAction: EnumDWT_OCRFindTextAction.OCRFT_MARKFORREDACT;
}
interface OCRZone {
left: number;
top: number;
right: number;
bottom: number;
}
interface OCRReadPara {
STWAIN: WebTwain;
AjaxFunctionUrl: string;
FunctionName: string;
ImageIndex: number;
FileNames: string;
Type: string;
AryZone: number[];
JsonString: string;
OnSuccess(): void;
OnFailure(): void;
}
interface OCRError {
responseText: string;
errorString: string;
}
interface Settings {
RecognitionModule: string;
Languages: string;
OutputFormat: EnumDWT_OCRProOutputFormat;
PDFVersion: EnumDWT_OCRProPDFVersion;
PDFAVersion: EnumDWT_OCRProPDFAVersion;
LicenseChecker: string;
Redaction: Redaction;
}
interface DynamsoftLib {
NewRedaction(): Redaction;
NewOCRReadPara(): OCRReadPara;
NewOCRZone(): OCRZone;
}
declare enum EnumDWT_OCRFindTextFlags {
OCRFT_WHOLEWORD = 1,
OCRFT_MATCHCASE = 2,
OCRFT_FUZZYMATCH = 4
}
declare enum EnumDWT_OCRFindTextAction {
OCRFT_HIGHLIGHT = 0,
OCRFT_STRIKEOUT = 1,
OCRFT_MARKFORREDACT = 2
}
declare enum EnumDWT_OCRProOutputFormat {
OCRPFT_IOTPDF = "IOTPDF",
OCRPFT_IOTPDF_MRC = "IOTPDF_MRC",
OCRPFT_TXTCSV = "TXTCSV",
OCRPFT_TXTF = "TXTF",
OCRPFT_TXTS = "TXTS",
OCRPFT_XML = "XML"
}
declare enum EnumDWT_OCRProPDFAVersion {
OCRPPDFAV_1A = "pdf/a-1a",
OCRPPDFAV_1B = "pdf/a-1b",
OCRPPDFAV_2A = "pdf/a-2a",
OCRPPDFAV_2B = "pdf/a-2b",
OCRPPDFAV_2U = "pdf/a-2u",
OCRPPDFAV_3A = "pdf/a-3a",
OCRPPDFAV_3B = "pdf/a-3b",
OCRPPDFAV_3U = "pdf/a-3u"
}
declare enum EnumDWT_OCRProPDFVersion {
OCRPPDFV_0 = "1.0",
OCRPPDFV_1 = "1.1",
OCRPPDFV_2 = "1.2",
OCRPPDFV_3 = "1.3",
OCRPPDFV_4 = "1.4",
OCRPPDFV_5 = "1.5",
OCRPPDFV_6 = "1.6",
OCRPPDFV_7 = "1.7"
}
declare enum EnumDWT_OCRProRecognitionModule {
OCRPM_AUTO = "AUTO",
OCRPM_MOSTACCURATE = "MOSTACCURATE",
OCRPM_BALANCED = "BALANCED",
OCRPM_FASTEST = "FASTEST"
}
declare enum EnumDWT_OCRProType {
OCRDT_File = 0,
OCRDT_Index = 1
}
interface OCRPro {
/**
* Returns whether OCR Pro addon is installed
* @return {boolean}
*/
IsModuleInstalled(): boolean;
/**
* Downloads and installs the ocr add-on on the local system.
* @param {string} remoteFile specifies the URL to download a ZIP which contains the OCR Pro addon
* @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess.
* @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure.
* @return {void}
*/
Download(remoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Performs OCR on a given image.
* @param {number} sImageIndex Specifies the index of the image.
* @param {function} AsyncSuccessFunc The function to call when OCR operation succeeds. Please refer to the function prototype OnOCRSuccess.
* @param {function} AsyncFailureFunc The function to call when OCR operation fails. Please refer to the function prototype OnOCRFailure.
* @return {void}
*/
Recognize(sImageIndex: number, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Performs OCR on one or multiple specified local file(s) directly.
* @param {string} fileNames Specifies the local paths of the target files. If multiple files are given, they should be separated by the '|' character.
* @param {function} AsyncSuccessFunc The function to call when OCR operation succeeds. Please refer to the function prototype OnOCRSuccess.
* @param {function} AsyncFailureFunc The function to call when OCR operation fails. Please refer to the function prototype OnOCRFailure.
* @return {void}
*/
RecognizeFile(fileNames: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Peforms OCR on the given rectangle on a specified image.
* @param {number} sImageIndex Specifies the index of the image.
* @param {number[]} aryZone specifies the coordinates of the rectangle.
* @param {function} AsyncSuccessFunc The function to call when OCR operation succeeds. Please refer to the function prototype OnOCRSuccess.
* @param {function} AsyncFailureFunc The function to call when OCR operation fails. Please refer to the function prototype OnOCRFailure.
* @return {void}
*/
RecognizeRect(sImageIndex: number, aryZone: number[], optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Performs OCR on the currently selected images in the buffer.
* @param {function} AsyncSuccessFunc The function to call when OCR operation succeeds. Please refer to the function prototype OnOCRSuccess.
* @param {function} AsyncFailureFunc The function to call when OCR operation fails. Please refer to the function prototype OnOCRFailure.
* @return {void}
*/
RecognizeSelectedImages(optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
NewOCRError(): OCRError;
NewOCRReadPara(): OCRReadPara;
NewOCRZone(): OCRZone;
NewSettings(): Settings;
}
interface DynamsoftWebTwainAddon {
OCRPro: OCRPro;
}

View File

@ -1,91 +0,0 @@
// tslint:disable:jsdoc-format
// tslint:disable:max-line-length
// tslint:disable:no-irregular-whitespace
/*!
* Product: Dynamsoft Web Twain
* Web Site: http://www.dynamsoft.com
*
* Copyright 2020, Dynamsoft Corporation
* Author: Dynamsoft Support Team
*/
declare enum EnumDWT_ConvertMode {
CM_DEFAULT = 0,
CM_RENDERALL = 1
}
declare enum EnumDWT_ConverMode {
CM_DEFAULT = 0,
CM_RENDERALL = 1
}
/**
* @class
*/
interface PDF {
/**
* Download and install pdf rasterizer add-on on the local system.
* [Deprecated] Starting in v14.2, the PDF module is installed with Dynamsoft Service.
* @method Dynamsoft.WebTwain.Addon.PDF#Download
* @param {string} remoteFile specifies the value of which frame to get.
* @param {function} optionalAsyncSuccessFunc optional.
* The function to call when the download succeeds. Please refer to the function prototype OnSuccess.
* @param {function} optionalAsyncFailureFunc optional.
* The function to call when the download fails. Please refer to the function prototype OnFailure.
* @return {boolean}
*/
Download(remoteFile: string,
optionalAsyncSuccessFunc?: () => void,
optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean;
/**
* Input the password to decrypt PDF files using PDF Rasterizer add-on.
* @method Dynamsoft.WebTwain#SetPassword
* @param {string} password Specifies the PDF password.
* @return {boolean}
*/
SetPassword(password: string): boolean;
/**
* Set the image convert mode for PDF Rasterizer in Dynamic Web TWAIN.
* @method Dynamsoft.WebTwain#SetConvertMode
* @param {EnumDWT_ConvertMode | EnumDWT_ConverMode} convertMode Specifies the image convert mode.
* @return {boolean}
*/
SetConvertMode(convertMode: EnumDWT_ConvertMode | EnumDWT_ConverMode): boolean;
/**
* Set the output resolution for the PDF Rasterizer in Dynamic Web TWAIN.
* @method Dynamsoft.WebTwain#ReadRect
* @param {float} fResolution Specifies the resolution for convert image from PDF file.
* @return {boolean}
*/
SetResolution(fResolution: number): boolean;
/**
* Judges whether the local PDF is text-based or not.
* @method Dynamsoft.WebTwain#ReadRect
* @param {string} localFile specifies the local path of the target PDF.
* @return {boolean}
*/
IsTextBasedPDF(localFile: string): boolean;
Write: PDFWrite;
}
interface PDFWrite {
/**
* Configures how the PDF generating is done
* @method Dynamsoft.WebTwain.Addon.PDF.Write#jsonWriteSetting
* @param {any} jsonWriteSetting detailed settings for PDF writing.
* @return {boolean}
*/
Setup(jsonWriteSetting: any): void;
}
interface DynamsoftWebTwainAddon {
PDF: PDF;
}

View File

@ -1,346 +0,0 @@
// tslint:disable:jsdoc-format
// tslint:disable:max-line-length
// tslint:disable:no-irregular-whitespace
/*!
* Product: Dynamsoft Web Twain
* Web Site: http://www.dynamsoft.com
*
* Copyright 2020, Dynamsoft Corporation
* Author: Dynamsoft Support Team
*/
/** -2400 to -2499 is webcam error code */
declare enum EnumDWT_ErrorCode {
/** All error from directshow sdk */
WCERR_SYSTEM = -2400,
/** Create ICreateDevEnum interface failed. */
WCERR_FAIL_ICREATEDEVENUM = -2401,
/** Create IEnumMoniker interface failed. */
WCERR_FAIL_IENUMMONIKER = -2402,
/** The camera doesn't support IAMVideoProcAmp interface. */
WCERR_NOT_IAMVIDEOPROPERTY = -2403,
/** The camera doesn't support IAMCameraControl interface. */
WCERR_NOT_IAMCAMERACONTROL = -2404,
/** The property doesn't support auto capability. */
WCERR_NOT_AUTOPROPERTY = -2405,
/** No webcam device is found. */
WCERR_NO_DEVICE = -2406,
/** Could not get video window interface */
WCERR_FAIL_VIDEOWINDOW = -2407,
/** Could not create filter graph. */
WCERR_FAIL_FILTERGRAPH = -2408,
/** Could not create SampleGrabber (isqedit.all registered?). */
WCERR_FAIL_SAMPLEGRABBER = -2409,
/** Unable to make NULL renderer */
WCERR_NULLRENDER = -2410,
/** Can't add the filter to graph */
WCERR_FAIL_ADDFILTER = -2411,
/** Can't build the graph */
WCERR_FAIL_BUILDGRAPH = -2412,
/** Failed to register filter graph with ROT. */
WCERR_FAIL_REGFILTERGRAPH = -2413,
/** Time out */
WCERR_GRAB_TIMEOUT = -2414
}
/** Specifies the video rotate mode on a video capture device. */
declare enum EnumDWT_VideoRotateMode {
/** Don't rotate */
VRM_NONE = 0,
/** 90 deg Clockwise */
VRM_90_DEGREES_CLOCKWISE = 1,
/** 180 deg Clockwise */
VRM_180_DEGREES_CLOCKWISE = 2,
/** 270 deg Clockwise */
VRM_270_DEGREES_CLOCKWISE = 3,
/** Flip */
VRM_FLIP_VERTICAL = 4,
/** Mirror */
VRM_FLIP_HORIZONTAL = 5
}
/** Specifies video properties on a video capture device. */
declare enum EnumDWT_VideoProperty {
/** Specifies the brightness, also called the black level. For NTSC, the value is expressed in IRE units * 100.
* For non-NTSC sources, the units are arbitrary, with zero representing blanking and 10,000 representing pure white.
* Values range from -10,000 to 10,000.
*/
VP_BRIGHTNESS = 0,
/** Specifies the contrast, expressed as gain factor * 100. Values range from zero to 10,000. */
VP_CONTRAST = 1,
/** Specifies the hue, in degrees * 100. Values range from -180,000 to 180,000 (-180 to +180 degrees). */
VP_HUE = 2,
/** Specifies the saturation. Values range from 0 to 10,000. */
VP_SATURATION = 3,
/** Specifies the sharpness. Values range from 0 to 100. */
VP_SHARPNESS = 4,
/** Specifies the gamma, as gamma * 100. Values range from 1 to 500. */
VP_GAMMA = 5,
/** Specifies the color enable setting. The possible values are 0 (off) and 1 (on). */
VP_COLORENABLE = 6,
/** Specifies the white balance, as a color temperature in degrees Kelvin. The range of values depends on the device. */
VP_WHITEBALANCE = 7,
/** Specifies the backlight compensation setting. Possible values are 0 (off) and 1 (on). */
VP_BACKLIGHTCOMPENSATION = 8,
/** Specifies the gain adjustment. Zero is normal. Positive values are brighter and negative values are darker.
* The range of values depends on the device.
*/
VP_GAIN = 9
}
/** Specifies a setting on a camera. */
declare enum EnumDWT_CameraControlProperty {
/** Specifies the camera's pan setting, in degrees. Values range from -180 to +180, with the default set to zero.
* Positive values are clockwise from the origin (the camera rotates clockwise when viewed from above),
* and negative values are counterclockwise from the origin.
*/
CCP_PAN = 0,
/** Specifies the camera's tilt setting, in degrees. Values range from -180 to +180, with the default set to zero.
* Positive values point the imaging plane up, and negative values point the imaging plane down.
*/
CCP_TILT = 1,
/** Specifies the camera's roll setting, in degrees. Values range from -180 to +180, with the default set to zero.
* Positive values cause a clockwise rotation of the camera along the image-viewing axis, and negative values cause a counterclockwise rotation of the camera.
*/
CCP_ROLL = 2,
/** Specifies the camera's zoom setting, in millimeters. Values range from 10 to 600, and the default is specific to the device. */
CCP_ZOOM = 3,
/** Specifies the exposure setting, in log base 2 seconds. In other words, for values less than zero, the exposure time is 1/2^n seconds,
* and for values zero or above, the exposure time is 2^n seconds. For example:
* Value Seconds
* -3 1/8
* -2 1/4
* -1 1/2
* 0 1
* 1 2
* 2 4
*/
CCP_EXPOSURE = 4,
/** Specifies the camera's iris setting, in units of fstop* 10. */
CCP_IRIS = 5,
/** Specifies the camera's focus setting, as the distance to the optimally focused target, in millimeters.
* The range and default value are specific to the device.
*/
CCP_FOCUS = 6
}
interface WebcamMediaType {
GetCount(): number;
Get(index: number): string;
GetCurrent(): string;
}
interface WebcamResolution {
GetCount(): number;
Get(index: number): string;
GetCurrent(): string;
}
interface WebcamFrameRate {
GetCount(): number;
Get(index: number): string;
GetCurrent(): string;
}
interface CameraControlMoreSetting {
GetMinValue(): number;
GetMaxValue(): number;
GetSteppingDelta(): number;
GetDefaultValue(): number;
GetIfAuto(): boolean;
}
interface CameraControlSetting {
GetValue(): number;
GetIfAuto(): boolean;
}
interface VideoPropertyMoreSetting {
GetMinValue(): number;
GetMaxValue(): number;
GetSteppingDelta(): number;
GetDefaultValue(): number;
GetIfAuto(): boolean;
}
interface VideoPropertySetting {
GetValue(): number;
GetIfAuto(): boolean;
}
/**
* @class
*/
interface Webcam {
IsModuleInstalled(): boolean;
GetFramePartURL(): string;
GetFrameURL(): string;
/**
* Download and install webcam add-on on the local system.
* @method Dynamsoft.WebTwain#Download
* @param {string} remoteFile:string specifies the value of which frame to get.
* @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess.
* @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure.
* @return {boolean}
*/
Download(remoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: () => void): void;
/**
* Return supported webcam source names.
* @method Dynamsoft.WebTwain#GetSourceList
* @return {string array}
*/
GetSourceList(): string[];
/**
* Select the source with the specified name.
* @method Dynamsoft.WebTwain#SelectSource
* @param {string} strSourceName The source name.
* @return {boolean}
*/
SelectSource(strSourceName: string): boolean;
/**
* Close the selected source and release the webcam.
* @method Dynamsoft.WebTwain#CloseSource
* @return {boolean}
*/
CloseSource(): boolean;
/**
* Show video stream in a specified container
* @method Dynamsoft.WebTwain#StopVideo
* @param {WebTwain} DWObject Specifies the WebTwain Object.
* @param {number} quality Specifies the quality of each frame in the video stream. Only valid for the HTML5 edition.
* @param {function} onFrameCaptured callback of the operation to capture
* @return {void}
*/
PlayVideo(DWObject: WebTwain, quality: number, onFrameCaptured: () => void): void;
/**
* Stop the video stream in the specified container
* @method Dynamsoft.WebTwain#StopVideo
* @return {boolean}
*/
StopVideo(): boolean;
/**
* Capture image from the specified webcam.
* @method Dynamsoft.WebTwain#CaptureImage
* @param {function} OnCaptureSuccess The function to call when the capture succeeds. Please refer to the function prototype OnCaptureSuccess.
* @param {function} OnCaptureError The function to call when the capture fails. Please refer to the function prototype OnCaptureError.
* @return {void}
*/
CaptureImage(OnCaptureSuccess: () => void, OnCaptureError: () => void): void;
/**
* Returns the media type for a camera.
* @method Dynamsoft.WebTwain#GetMediaType
* @return {class MediaType}
*/
GetMediaType(): WebcamMediaType;
/**
* Returns the count in the media type list.
* @method Dynamsoft.WebTwain#GetResolution
* @return {class Resolution}
*/
GetResolution(): WebcamResolution;
/**
* Returns the frame rate for a camera.
* @method Dynamsoft.WebTwain#GetFrameRate
* @return {class FrameRate}
*/
GetFrameRate(): WebcamFrameRate;
/**
* Set the media type of the current selected source by the value.
* @method Dynamsoft.WebTwain#SetMediaType
* @param {string} value The new media type value.
* @return {boolean}
*/
SetMediaType(value: string): boolean;
/**
* Set the resolution of the current camera source.
* @method Dynamsoft.WebTwain#SetResolution
* @param {string} value The new resolution value.
* @return {boolean}
*/
SetResolution(value: string): boolean;
/**
* Set current frame rate.
* @method Dynamsoft.WebTwain#SetFrameRate
* @param {number} value The new frame rate value.
* @return {boolean}
*/
SetFrameRate(value: number): boolean;
/**
* Gets the current setting of a video property.
* @method Dynamsoft.WebTwain#GetVideoPropertySetting
* @param {EnumDWT_VideoProperty} property The property.
* @return {class VideoPropertySetting}
*/
GetVideoPropertySetting(property: EnumDWT_VideoProperty): VideoPropertySetting;
/**
* Gets the range and default value of a specified video property.
* @method Dynamsoft.WebTwain#GetVideoPropertyMoreSetting
* @param {EnumDWT_VideoProperty} property The property.
* @return {class VideoPropertyMoreSetting}
*/
GetVideoPropertyMoreSetting(property: EnumDWT_VideoProperty): VideoPropertyMoreSetting;
/**
* Gets the current setting of a camera property.
* @method Dynamsoft.WebTwain#GetCameraControlPropertySetting
* @param {EnumDWT_CameraControlProperty} property The property.
* @return {class CameraControlPropertySetting}
*/
GetCameraControlPropertySetting(property: EnumDWT_CameraControlProperty): CameraControlSetting;
/**
* Gets the range and default value of a specified camera property.
* @method Dynamsoft.WebTwain#GetVideoPropertyMoreSetting
* @param {EnumDWT_CameraControlProperty} property The property.
* @return {class CameraControlPropertyMoreSetting}
*/
GetCameraControlPropertyMoreSetting(property: EnumDWT_CameraControlProperty): CameraControlMoreSetting;
/**
* Sets video quality for a specified property.
* @method Dynamsoft.WebTwain#SetVideoPropertySetting
* @param {EnumDWT_VideoProperty} property The property.
* @param {number} value The new value of the property.
* @param {boolean} auto The desired control setting, whether the setting is controlled manually or automatically.
* @return {boolean}
*/
SetVideoPropertySetting(property: EnumDWT_VideoProperty, value: number, auto: boolean): boolean;
/**
* Sets video rotate mode.
* @method Dynamsoft.WebTwain#SetVideoRotateMode
* @param {EnumDWT_VideoRotateMode} enumAngle The rotate angle.
* @return {boolean}
*/
SetVideoRotateMode(enumAngle: EnumDWT_VideoRotateMode): boolean;
/**
* Sets a specified property on the camera.
* @method Dynamsoft.WebTwain#SetCameraControlPropertySetting
* @param {EnumDWT_CameraControlProperty} property The property.
* @param {number} value The new value of the property.
* @param {boolean} auto The desired control setting, whether the setting is controlled manually or automatically.
* @return {boolean}
*/
SetCameraControlPropertySetting(property: EnumDWT_CameraControlProperty, value: number, auto: boolean): boolean;
}
interface DynamsoftWebTwainAddon {
Webcam: Webcam;
}

227
types/dwt/dbr.d.ts vendored
View File

@ -1,227 +0,0 @@
// tslint:disable:jsdoc-format
// tslint:disable:max-line-length
// tslint:disable:no-irregular-whitespace
/*!
* Product: Dynamsoft Web Twain
* Web Site: http://www.dynamsoft.com
*
* Copyright 2020, Dynamsoft Corporation
* Author: Dynamsoft Support Team
*/
interface Region {
left: number;
top: number;
right: number;
bottom: number;
measuredByPercentage: number;
}
interface RunTimeSetting {
barcodeFormatIds: number;
binarizationModes: number[];
deblurLevel: number;
expectedBarcodesCount: number;
localizationModes: number[];
minBarcodeTextLength: number;
minResultConfidence: number;
region: Region;
resultCoordinateType: number;
scaleDownThreshold: number;
textResultOrderModes: number[];
timeout: number;
}
interface dbrEnv {
bAutoConnectService: boolean;
logLevel: number;
productKey: string;
resourcesPath: string;
hideDWASInstallDialog: boolean;
disableAutoDownloadModule: boolean;
onAutoConnectServiceSuccess(): void;
onAutoConnectServiceError(status: any): void;
}
interface TaskQueue {
push(task: (bLoadingWhenPush: boolean) => void, context?: any, args?: []): void;
unshift(task: (bLoadingWhenPush: boolean) => void, context?: any, args?: []): void;
next(): void;
}
declare namespace dynamsoft {
namespace BarcodeReader {
/** Barcode Formats */
enum EnumBarcodeFormat {
All = 503317503,
OneD = 0x3FF,
CODE_39 = 0x1,
CODE_128 = 0x2,
CODE_93 = 0x4,
CODABAR = 0x8,
ITF = 0x10,
EAN_13 = 0x20,
EAN_8 = 0x40,
UPC_A = 0x80,
UPC_E = 0x100,
INDUSTRIAL_25 = 0x200,
PDF417 = 0x2000000,
QR_CODE = 0x4000000,
DATAMATRIX = 0x8000000,
AZTEC = 0x10000000
}
enum EnumErrorCode {
DBR_SYSTEM_EXCEPTION = 1,
DBR_SUCCESS = 0,
DBR_UNKNOWN = -10000,
DBR_NO_MEMORY = -10001,
DBR_NULL_REFERENCE = -10002,
DBR_LICENSE_INVALID = -10003,
DBR_LICENSE_EXPIRED = -10004,
DBR_FILE_NOT_FOUND = -10005,
DBR_FILETYPE_NOT_SUPPORTED = -10006,
DBR_BPP_NOT_SUPPORTED = -10007,
DBR_INDEX_INVALID = -10008,
DBR_BARCODE_FORMAT_INVALID = -10009,
DBR_CUSTOM_REGION_INVALID = -10010,
DBR_MAX_BARCODE_NUMBER_INVALID = -10011,
DBR_IMAGE_READ_FAILED = -10012,
DBR_TIFF_READ_FAILED = -10013,
DBR_QR_LICENSE_INVALID = -10016,
DBR_1D_LICENSE_INVALID = -10017,
DBR_DIB_BUFFER_INVALID = -10018,
DBR_PDF417_LICENSE_INVALID = 10019,
DBR_DATAMATRIX_LICENSE_INVALID = -10020,
DBR_PDF_READ_FAILED = -10021,
DBR_PDF_DLL_MISSING = -10022,
DBR_PAGE_NUMBER_INVALID = -10023,
DBR_CUSTOM_SIZE_INVALID = -10024,
DBR_CUSTOM_MODULESIZE_INVALID = -10025,
DBR_RECOGNITION_TIMEOUT = -10026,
DBR_JSON_PARSE_FAILED = -10030,
DBR_JSON_TYPE_INVALID = -10031,
DBR_JSON_KEY_INVALID = -10032,
DBR_JSON_VALUE_INVALID = -10033,
DBR_JSON_NAME_KEY_MISSING = -10034,
DBR_JSON_NAME_VALUE_DUPLICATED = -10035,
DBR_TEMPLATE_NAME_INVALID = -10036,
DBR_JSON_NAME_REFERENCE_INVALID = -10037,
DBR_PARAMETER_VALUE_INVALID = 10038,
DBR_DOMAIN_NOT_MATCHED = -10039,
DBR_RESERVEDINFO_NOT_MATCHED = -10040,
DBR_DBRERR_AZTEC_LICENSE_INVALID = -10041
}
enum EnumConflictMode {
ECM_Ignore = 1,
ECM_Overwrite = 2
}
enum EnumImagePixelFormat {
IPF_Binary = 0,
IPF_BinaryInverted = 1,
IPF_GrayScaled = 2,
IPF_NV21 = 3,
IPF_RGB_565 = 4,
IPF_RGB_555 = 5,
IPF_RGB_888 = 6,
IPF_ARGB_8888 = 7
}
enum EnumResultType {
EDT_CandidateText = 2,
EDT_PartialText = 3,
EDT_RawText = 1,
EDT_StandardText = 0
}
enum EnumTerminateStage {
ETS_Localized = 1,
ETS_Prelocalized = 0,
ETS_Recognized = 2
}
}
class BarcodeReader {
/**
* Constructs a new KPainter
*/
constructor(dbrKey?: string);
static BarcodeReaderException(): any;
static initServiceConnection(): Promise<any>;
static name: string;
static length: number;
static version: string;
/**
* Append a new template string to current runtime settings.
* @method BarcodeReader#decode
* @param {string} content A JSON string that represents the content of the settings.
* @param {number} emSettingPriority The parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
* @return {void}
*/
appendTplStringToRuntimeSettings(content: string, emSettingPriority: number): void;
/**
* Read barcode from the source image.
* @method BarcodeReader#decode
* @param {string} source specifies the image to read on
* @return {Promise}
* @example
```javascript
// dwtUrl: HTML5 Edition only
reader.decode('dwt://dwt_trial_13000404/img?id=306159652&index=0&t=1502184632022').then(
results=>{
for(var i = 0; i < results.length; ++i){
console.log(results[i].BarcodeText);
// Confidence >= 30 is reliable
console.log(results[i].LocalizationResult.ExtendedResultArray[0].Confidence);
}
});
// dcsUrl
reader.decode('dcs://dcs_trial_6110531/img?id=306159652&index=0&t=1502184632022').then(
function(results){
// ie6-7 does not support console.log
var messageArr = [];
for(var i = 0; i < results.length; ++i){
messageArr.push(results[i].BarcodeText);
// Confidence >= 30 is reliable
messageArr.push(results[i].LocalizationResult.ExtendedResultArray[0].Confidence);
}
alert(messageArr.join(''));
})['catch'](function(ex){
// ie6-9 does not support '.catch(function(ex){...})'
if(ex){alert(ex.message||ex);}
});
```
*/
decode(source: string): Promise<any>;
/**
* Read barcode from base64 string
*/
decodeBase64String(base64String: string): Promise<any>;
getAllLocalizationResults(): any;
getAllParameterTemplateNames(): any;
getRuntimeSettings(): RunTimeSetting;
initRuntimeSettingsWithString(): any;
outputSettingsToString(): any;
resetRuntimeSettings(): void;
updateRuntimeSettings(setting: RunTimeSetting): void;
}
let TaskQueue: TaskQueue;
let dbrEnv: dbrEnv;
/**dbrMasterPage20170526 */
let dcp: {
ifCheck64bitServiceFirst: boolean;
};
/**dwtDbrDemo20170613 */
let initOrder: any;
let lib: any;
let managerEnv: any;
let navInfo: any;
}

View File

@ -2,108 +2,99 @@
// tslint:disable:max-line-length
// tslint:disable:no-irregular-whitespace
import * as Dynamsoft from 'dwt';
import Dynamsoft from 'dwt';
import { DeviceConfiguration } from 'dwt/WebTwain.Acquire';
function dwtOnReady() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer'); // Get the Dynamic Web TWAIN object that is embeded in the div with id 'dwtcontrolContainer'
function Dynamsoft_OnReady() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
let count = DWObject.SourceCount;
if (count === 0) {
DWObject.CloseSourceManager();
DWObject.ImageCaptureDriverType = 0;
DWObject.OpenSourceManager();
count = DWObject.SourceCount;
}
}
let count = DWObject.SourceCount;
if (count === 0) {
DWObject.CloseSourceManager();
DWObject.ImageCaptureDriverType = 0;
DWObject.OpenSourceManager();
count = DWObject.SourceCount;
}
}
}
function acquireImage() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.SelectSourceByIndex(0); // Use method SelectSourceByIndex to avoid the 'Select Source' dialog
DWObject.OpenSource();
DWObject.IfDisableSourceAfterAcquire = true; // Scanner source will be disabled/closed automatically after the scan.
DWObject.AcquireImage({}, () => {}, (errorCode: number, errorString: string) => {DWObject.CloseSource(); });
}
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.SelectSourceByIndex(0); // Use method SelectSourceByIndex to avoid the 'Select Source' dialog
DWObject.OpenSource();
DWObject.IfDisableSourceAfterAcquire = true; // Scanner source will be disabled/closed automatically after the scan.
DWObject.AcquireImage({}, () => { }, (settings: DeviceConfiguration, errorCode: number, errorString: string) => { DWObject.CloseSource(); });
}
}
function registerEvent() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
// The event OnPostTransfer fires after each image is scanned and transferred
DWObject.RegisterEvent("OnPostTransfer", function () {});
// The event OnPostLoad fires after the images from a local directory have been loaded into the control
DWObject.RegisterEvent("OnPostLoad", function () {});
// The event OnMouseClick fires when the mouse clicks on an image on Dynamic Web TWAIN viewer
DWObject.RegisterEvent("OnMouseClick", function () {});
// The event OnTopImageInTheViewChanged fires when the top image currently displayed in the viewer changes
DWObject.RegisterEvent("OnTopImageInTheViewChanged", function (index: number) {
DWObject.CurrentImageIndexInBuffer = index;
});
}
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.RegisterEvent("OnPostTransfer", function () { });
DWObject.RegisterEvent("OnPostLoad", function () { });
DWObject.RegisterEvent("OnMouseClick", function () { });
DWObject.RegisterEvent("OnTopImageInTheViewChanged", function (index: number) {
DWObject.CurrentImageIndexInBuffer = index;
});
}
}
function editImage() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
if (DWObject.HowManyImagesInBuffer > 0)
DWObject.RotateLeft(DWObject.CurrentImageIndexInBuffer);
if (DWObject.HowManyImagesInBuffer > 0)
DWObject.RotateRight(DWObject.CurrentImageIndexInBuffer);
if (DWObject.HowManyImagesInBuffer > 0)
DWObject.Mirror(DWObject.CurrentImageIndexInBuffer);
if (DWObject.HowManyImagesInBuffer > 0)
DWObject.Flip(DWObject.CurrentImageIndexInBuffer);
}
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
if (DWObject.HowManyImagesInBuffer > 0)
DWObject.RotateLeft(DWObject.CurrentImageIndexInBuffer);
if (DWObject.HowManyImagesInBuffer > 0)
DWObject.RotateRight(DWObject.CurrentImageIndexInBuffer);
if (DWObject.HowManyImagesInBuffer > 0)
DWObject.Mirror(DWObject.CurrentImageIndexInBuffer);
if (DWObject.HowManyImagesInBuffer > 0)
DWObject.Flip(DWObject.CurrentImageIndexInBuffer);
}
}
function showImageEditor() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.ShowImageEditor();
}
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.ShowImageEditor();
}
}
function saveImage() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.ConvertToGrayScale(DWObject.CurrentImageIndexInBuffer);
DWObject.SaveAsJPEG("DynamicWebTWAIN.jpg", DWObject.CurrentImageIndexInBuffer);
DWObject.SaveAllAsMultiPageTIFF("DynamicWebTWAIN.tiff", () => {}, (errorCode: number, errorString: string) => {});
DWObject.SaveAllAsPDF("DynamicWebTWAIN.pdf", () => {}, (errorCode: number, errorString: string) => {});
}
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.ConvertToGrayScale(DWObject.CurrentImageIndexInBuffer);
DWObject.SaveAsJPEG("DynamicWebTWAIN.jpg", DWObject.CurrentImageIndexInBuffer);
DWObject.SaveAllAsMultiPageTIFF("DynamicWebTWAIN.tiff", () => { }, (errorCode: number, errorString: string) => { });
DWObject.SaveAllAsPDF("DynamicWebTWAIN.pdf", () => { }, (errorCode: number, errorString: string) => { });
}
}
function updateLargeViewer() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
const DWObjectLargeViewer = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainerLargeViewer');
if (DWObject) {
DWObject.CopyToClipboard(DWObject.CurrentImageIndexInBuffer); // Copy the current image in the thumbnail to clipboard in DIB format.
DWObjectLargeViewer.LoadDibFromClipboard(); // Load the image from Clipboard into the large viewer.
}
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
const DWObjectLargeViewer = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainerLargeViewer');
if (DWObject) {
DWObject.CopyToClipboard(DWObject.CurrentImageIndexInBuffer); // Copy the current image in the thumbnail to clipboard in DIB format.
DWObjectLargeViewer.LoadDibFromClipboard(); // Load the image from Clipboard into the large viewer.
}
}
function uploadImage() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.HTTPPort = 80;
DWObject.IfSSL = false;
DWObject.HTTPUploadThroughPost("www.dynamsoft.com", DWObject.CurrentImageIndexInBuffer, "upload", "tmp.jpg", () => {}, (errorCode: number, errorString: string) => {});
}
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.HTTPPort = 80;
DWObject.IfSSL = false;
DWObject.HTTPUploadThroughPost("www.dynamsoft.com", DWObject.CurrentImageIndexInBuffer, "upload", "tmp.jpg", () => { }, (errorCode: number, errorString: string) => { });
}
}
function downloadImage() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.HTTPPort = 80;
DWObject.HTTPDownload("www.dynamsoft.com", "img.png", () => {}, (errorCode: number, errorString: string) => {});
}
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.HTTPPort = 80;
DWObject.HTTPDownload("www.dynamsoft.com", "img.png", () => { }, (errorCode: number, errorString: string) => { });
}
}
function loadPDF() {

18
types/dwt/index.d.ts vendored
View File

@ -1,4 +1,4 @@
// Type definitions for dwt 15.3
// Type definitions for dwt 16.0
// Project: https://www.dynamsoft.com/products/webtwain_overview.aspx
// Definitions by: Xiao Ling <https://github.com/yushulx>
// Josh Hall <https://github.com/jbh>
@ -8,23 +8,13 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
/// <reference path="Dynamsoft.d.ts" />
/// <reference path="addon.ocr.d.ts" />
/// <reference path="addon.ocrp.d.ts" />
/// <reference path="addon.pdf.d.ts" />
/// <reference path="addon.webcam.d.ts" />
/// <reference path="dbr.d.ts" />
/// <reference path="mbc.d.ts" />
/*!
* Based on Dynamsoft WebTwain JavaScript Intellisense
* Product: Dynamsoft Web Twain
* Web Site: http://www.dynamsoft.com
*
* Copyright 2020, Dynamsoft Corporation
* Author: Dynamsoft Support Team
* Version: 15.3
* Version: 16.0
*/
declare const Dynamsoft: DynamsoftStatic;
export = Dynamsoft;
import Dynamsoft from "./Dynamsoft";
export default Dynamsoft;

1046
types/dwt/mbc.d.ts vendored

File diff suppressed because it is too large Load Diff