diff --git a/types/dwt/Dynamsoft.d.ts b/types/dwt/Dynamsoft.d.ts index 5439cad335..ac2c7c8fb3 100644 --- a/types/dwt/Dynamsoft.d.ts +++ b/types/dwt/Dynamsoft.d.ts @@ -57,6 +57,10 @@ interface dwtEnv { UseDefaultInstallUI: boolean; initQueue: any[]; inited: boolean; + + IfAddMD5InUploadHeader: boolean; + IfConfineMaskWithinTheViewer: boolean; + CustomizableDisplayInfo: any; } interface DynamsoftLib { @@ -3199,6 +3203,24 @@ interface WebTwain { */ HTTPUploadThroughPutEx(HTTPServer: string, sImageIndex: number, RemoteFileName: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + /** + * Converts the image ID of an image to its index. + * [Version] Added in v15.0 + * @method WebTwain#ImageIDToIndex + * @param {number} sImageID specifies the imageID. + * @return {number} + */ + ImageIDToIndex(sImageID: number): number; + + /** + * Converts the index of an image to its image ID. + * [Version] Added in v15.0 + * @method WebTwain#IndexToImageID + * @param {number} sImageIndex specifies the index. + * @return {number} + */ + IndexToImageID(sImageIndex: number): number; + /** * [Deprecated.] Detects whether an image is blank. * @method WebTwain#IsBlankImage @@ -3740,9 +3762,13 @@ interface WebTwain { /** * Shows the GUI of Image Editor. * @method WebTwain#ShowImageEditor + * @param {string} elEditorDIV Specifies a DIV by its ID to put the editor in + * @param {number} width Specifies the width of the DIV + * @param {number} height Specifies the height of the DIV + * @param {boolean} bHideToolBar Specifies whether to show the toolbar or not * @return {boolean} */ - ShowImageEditor(): boolean; + ShowImageEditor(elEditorDIV?: string, width?: number, height?: number, bHideToolBar?: boolean): boolean; /** * [Deprecated.] Shows the GUI of Image Editor with custom settings. @@ -3759,6 +3785,14 @@ interface WebTwain { /*ingored SourceNameItems */ + + /** + * Shows the GUI of Image Editor. + * @method WebTwain#startScan + * @return {Promise} + * @param {any} scanSetup Specifies how images are scanned and outputed + */ + startScan(scanSetup: any): Promise; /** * Switchs two images of specified indices in buffer. diff --git a/types/dwt/addon.pdf.d.ts b/types/dwt/addon.pdf.d.ts index 05a8eed908..f097d0ef40 100644 --- a/types/dwt/addon.pdf.d.ts +++ b/types/dwt/addon.pdf.d.ts @@ -26,7 +26,10 @@ declare enum EnumDWT_ConverMode { interface PDF { /** * Download and install pdf rasterizer add-on on the local system. - * @method Dynamsoft.WebTwain#Download + + * [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. @@ -69,6 +72,18 @@ interface 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 {