From 7ded68efdce7e417843445fbfc009fbb79c63cd7 Mon Sep 17 00:00:00 2001 From: ztyyLV <97287824+ztyyLV@users.noreply.github.com> Date: Mon, 27 Mar 2023 16:39:14 +0800 Subject: [PATCH 1/7] Update WebTwain_Buffer.md --- info/api/WebTwain_Buffer.md | 388 ++++++++++++++++++------------------ 1 file changed, 191 insertions(+), 197 deletions(-) diff --git a/info/api/WebTwain_Buffer.md b/info/api/WebTwain_Buffer.md index 19f0fac1..5dd22f41 100644 --- a/info/api/WebTwain_Buffer.md +++ b/info/api/WebTwain_Buffer.md @@ -387,7 +387,7 @@ ClearFilter(): number[]; ## SetDefaultTag -Set a default tag for newly acquired images. +Set a default tag for newly incoming images. **Syntax** @@ -933,19 +933,24 @@ If the calculation fails, -1 is returned. ## GetImagePartURL +Return the internal URL of the specified image. + **Syntax** ```typescript -/** - * Return the internal URL of the specified image. - * @param index Specify the image. - * @param width The width of the image (>150). - * @param height The height of the image (>150). - */ GetImagePartURL(index: number, width?: number, height?: number): string; ``` +**Parameters** + +`index`: Specify the image. + +`width`: The width of the image (>150 px). + +`height`: The height of the image (>150 px). + **Availability** +
@@ -984,19 +989,24 @@ if x/a < y/b, return the image (x, b\*x/a); if x/a > y/b, return the image (a\*y ## GetImageURL +Return the direct URL of the specified image. + **Syntax** ```typescript -/** - * Return the direct URL of the specified image. - * @param index Specify the image. - * @param width The width of the image (>150). - * @param height The height of the image (>150). - */ GetImageURL(index: number, width?: number, height?: number): string; ``` +**Parameters** + +`index`: Specify the image. + +`width`: The width of the image (>150 px). + +`height`: The height of the image (>150 px). + **Availability** +
@@ -1035,16 +1045,16 @@ if x/a < y/b, return the image (x, b\*x/a); if x/a > y/b, return the image (a\*y ## SelectAllImages +Select all images and return the indices. Viewer will be scrolled to the last image. + **Syntax** ```typescript -/** - * Select all images and return the indices. Viewer will be scrolled to the last image. - */ SelectAllImages(): number[]; ``` **Availability** +
@@ -1071,18 +1081,20 @@ SelectAllImages(): number[]; ## SelectImages +Select the specified images. + **Syntax** ```typescript - -/** - * Select the specified images. - * @param indices Specify one or multiple images. - */ SelectImages(indices: number[]): boolean; ``` +**Parameters** + +`indices`: Specify one or multiple images + **Availability** +
@@ -1109,18 +1121,22 @@ SelectImages(indices: number[]): boolean; ## MoveImage +Change the position of an image in the buffer. + **Syntax** ```typescript -/** - * 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; ``` +**Parameters** + +`from`: Specify the original position by index. + +`to`: Specify the target position by index. + **Availability** +
@@ -1147,18 +1163,22 @@ MoveImage(from: number, to: number): boolean; ## SwitchImage +Exchange the positions of two images. + **Syntax** ```typescript -/** - * Exchange the positions of two images. - * @param index1 Specify the 1st image. - * @param index2 Specify the 2nd image. - */ SwitchImage(index1: number, index2: number): boolean; ``` +**Parameters** + +`index1`: Specify the 1st image. + +`index2`: Specify the 2nd image. + **Availability** +
@@ -1185,19 +1205,20 @@ SwitchImage(index1: number, index2: number): boolean; ## RemoveImage +Remove the specified image. + **Syntax** ```typescript -/** - -* Remove the specified image. -* @param index Specify the image. - -*/ RemoveImage(index: number): boolean; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
@@ -1226,16 +1247,16 @@ RemoveImage(index: number): boolean; ## RemoveAllImages +Remove all images. + **Syntax** ```typescript -/** - * Remove all images. - */ RemoveAllImages(): boolean; ``` **Availability** +
@@ -1277,16 +1298,16 @@ RemoveAllImagesAsync(): Promise; ## RemoveAllSelectedImages +Remove all selected images. + **Syntax** ```typescript -/** - * Remove all selected images. - */ RemoveAllSelectedImages(): boolean; ``` **Availability** +
@@ -1328,16 +1349,16 @@ RemoveAllSelectedImagesAsync(): Promise; ## CurrentImageIndexInBuffer +Return the index of the current image in the buffer or set the image specified by index as the current image. + **Syntax** ```typescript -/** - * Return the index of the current image in the buffer or set the image specified by index as the current image. - */ CurrentImageIndexInBuffer: number; ``` **Availability** +
@@ -1364,16 +1385,16 @@ CurrentImageIndexInBuffer: number; ## HowManyImagesInBuffer +Return how many images are held in the buffer + **Syntax** ```typescript -/** - * Return how many images are held in the buffer - */ readonly HowManyImagesInBuffer: number; ``` **Availability** +
@@ -1400,16 +1421,16 @@ readonly HowManyImagesInBuffer: number; ## MaxImagesInBuffer +Return or set how many images can be held in the buffer. + **Syntax** ```typescript -/** - * Return or set how many images can be held in the buffer. - */ MaxImagesInBuffer: number; ``` **Availability** +
@@ -1440,16 +1461,16 @@ When acquiring images and the number of images goes beyond the value set to `Max ## SelectedImagesIndices +Return the indices of the selected images. + **Syntax** ```typescript -/** - * Return the indices of the selected images. - */ readonly SelectedImagesIndices: number[]; ``` **Availability** +
@@ -1476,16 +1497,16 @@ readonly SelectedImagesIndices: number[]; ## SelectionRectAspectRatio +Specify a aspect ratio to be used when selecting a rectangle on an image. + **Syntax** ```typescript -/** - * Specify a aspect ratio to be used when selecting a rectangle on an image. - */ SelectionRectAspectRatio: number; ``` **Availability** +
@@ -1512,16 +1533,16 @@ SelectionRectAspectRatio: number; ## BlankImageCurrentStdDev +Return the deviation of the pixels in the current image. + **Syntax** ```typescript -/** - * Return the deviation of the pixels in the current image. - */ readonly BlankImageCurrentStdDev: number; ``` **Availability** +
@@ -1553,16 +1574,16 @@ This property is only valid after `IsBlankImageExpress` or `IsBlankImage()` is c ## BlankImageMaxStdDev +Return or set the maximum deviation of the pixels in an image which is used to determine whether the image is blank. + **Syntax** ```typescript -/** - * Return or set the maximum deviation of the pixels in an image which is used to determine whether the image is blank. - */ BlankImageMaxStdDev: number; ``` **Availability** +
@@ -1595,16 +1616,16 @@ This property is only valid before `IsBlankImageExpress` is called. ## BlankImageThreshold +Returns or sets the dividing line between black and white. + **Syntax** ```typescript -/** - * Returns or sets the dividing line between black and white. - */ BlankImageThreshold: number; ``` **Availability** +
@@ -1636,17 +1657,16 @@ This property is only valid before `IsBlankImageExpress` is called. ## BufferMemoryLimit +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. + **Syntax** ```typescript -/** - * 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; ``` **Availability** +
@@ -1680,17 +1700,20 @@ All cached data is encrypted and can only be read by Dynamic Web TWAIN and it wi ## IsBlankImage +Check whether the specified image is blank. + **Syntax** ```typescript -/** - * Check whether the specified image is blank. - * @param index Specify the image. - */ IsBlankImage(index: number): boolean; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
@@ -1717,17 +1740,20 @@ IsBlankImage(index: number): boolean; ## IsBlankImageExpress +Check whether the specified image is blank. + **Syntax** ```typescript -/** - * Check whether the specified image is blank. - * @param index Specify the image. - */ IsBlankImageExpress(index: number): boolean; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
@@ -1766,16 +1792,16 @@ If the image is not blank and it is not black and white, `IsBlankImage()` or `Is ## IfAllowLocalCache +Return or set whether the feature of disk caching is enabled. + **Syntax** ```typescript -/** - * Return or set whether the feature of disk caching is enabled. - */ IfAllowLocalCache: boolean; ``` **Availability** +
@@ -1809,13 +1835,11 @@ All cached data is encrypted and can only be read by Dynamic Web TWAIN and it wi ## OnBufferChanged +An enhanced callback triggered when a change occurs in the buffer. + **Syntax** ```typescript -/** - * An enhanced callback triggered when a change occurs in the buffer. - * @argument bufferChangeInfo Details about the buffer change. - */ RegisterEvent('OnBufferChanged', function (bufferChangeInfo: BufferChangeInfo) {} ): boolean; @@ -1840,7 +1864,12 @@ interface BufferChangeInfo { } ``` +**Parameters** + +`bufferChangeInfo`: Details about the buffer change. + **Availability** +
@@ -1877,19 +1906,11 @@ Action types include ## OnBitmapChanged +A built-in callback triggered when the current image in buffer is changed like flipped, cropped, rotated, etc. or a new image has been acquired. + **Syntax** ```typescript -/** - * A built-in callback triggered when the current image in buffer is changed like flipped, cropped, rotated, etc. or a new image has been acquired. - * @argument indexString Array of the changed index(indices). - * @argument type Operation type. - 1 means new image(s) were added at the tail, - 2 means image(s) were inserted before the current index, - 3 means image(s) are deleted, - 4 means image(s) are modified, - * @argument index Index of the current image. - */ RegisterEvent('OnBitmapChanged', function ( indexString: number[], @@ -1899,7 +1920,20 @@ RegisterEvent('OnBitmapChanged', ): boolean; ``` +**Parameters** + +`indexString`: Array of the changed index(indices). + +`type`: Operation type. + 1 means new image(s) were added at the tail, + 2 means image(s) were inserted before the current index, + 3 means image(s) are deleted, + 4 means image(s) are modified, + +`index`: Index of the current image. + **Availability** +
@@ -1937,19 +1971,22 @@ DWObject.RegisterEvent( ## OnTopImageInTheViewChanged +A built-in callback triggered when the top index currently displayed in the viewer changes. + **Syntax** ```typescript -/** - * A built-in callback triggered when the top index currently displayed in the viewer changes. - * @argument index Index of the current image. - */ RegisterEvent('OnTopImageInTheViewChanged', function (index: number) {} ): boolean; ``` +**Parameters** + +`index`: Index of the current image. + **Availability** +
@@ -1980,13 +2017,11 @@ This API does not work if the view mode of the viewer is set to -1 by -1. ## OnIndexChangeDragDropDone +A built-in callback triggered when images in the buffer are dragged to new positions. + **Syntax** ```typescript -/** - * A built-in callback triggered when images in the buffer are dragged to new positions. - * @argument indexPairs The list of index changes. - */ RegisterEvent('OnIndexChangeDragDropDone', function (indexPairs: Pair[]) {} ): boolean; @@ -1994,7 +2029,12 @@ RegisterEvent('OnIndexChangeDragDropDone', Pair: [from: number, to: number]; ``` +**Parameters** + +`indexPairs`: The list of index changes. + **Availability** +
@@ -2021,17 +2061,20 @@ Pair: [from: number, to: number]; ## GetTagListByIndex +Return the tag(s) of a specified image. + **Syntax** ```typescript -/** - * Return the tag(s) of a specified image. - * @argument index Index of the image. - */ GetTagListByIndex(index: number):string[] ``` +**Parameters** + +`index`: Index of the image. + **Availability** +
@@ -2064,28 +2107,20 @@ DWObject.GetTagListByIndex(0); ## CreateDocument +Create a document for the scanned image(s). + **Syntax** -
->- v17.3 ->- v17.2.5 -> -> ```typescript -/** - * Create a document for the scanned image(s). - * @argument documentName Specify the document name. - */ CreateDocument(documentName:string):boolean; ``` -```typescript -/** - * Create a category for the scanned image(s). - * @argument categoryName Specify the category name. - */ -CreateFile(categoryName:string):boolean; -``` + +**Parameters** + +`documentName`: Specify the document name. + **Availability** +
@@ -2123,35 +2158,24 @@ function failureCallback(errorCode, errorString) { } ``` - - --- ## OpenDocument +Use the specified document for the scanned image(s) + **Syntax** -
->- v17.3 ->- v17.2.5 -> -> ```typescript -/** - * Use the specified document for the scanned image(s) - * @argument documentName Specify the document name. - */ OpenDocument(documentName:string):boolean; ``` -```typescript -/** - * Use the specified category for the scanned image(s) - * @argument categoryName Specify the category name. - */ -OpenFile(categoryName:string):boolean; -``` + +**Parameters** + +`documentName`: Specify the document name. **Availability** +
@@ -2195,26 +2219,16 @@ function failureCallback(errorCode, errorString) { ## GetCurrentDocumentName +Get the current document name. The default value is 'dynamsoft-default-document'. Scanned image(s) are saved in this document by default if no document name is created. + **Syntax** -
->- v17.3 ->- v17.2.5 -> -> ```typescript -/** - * Get the current document name. The default value is 'dynamsoft-default-document'. Scanned image(s) are saved in this document by default if no document name is created. - */ GetCurrentDocumentName():string; ``` -```typescript -/** - * Get the current category name. The default value is 'dynamsoft-dvs-file'. Scanned image(s) are stored in this category by default if no category name is created. - */ -GetCurrentFileName():string; -``` + **Availability** +
@@ -2241,18 +2255,22 @@ GetCurrentFileName():string; ## RenameDocument +Rename a document. + **Syntax** ```typescript -/** - * Rename a document. - * @argument oldDocumentName Specify the old document name. - * @argument newDocumentName Specify the new document name. - */ RenameDocument(oldDocumentName:string, newDocumentName:string):boolean; ``` +**Parameters** + +`oldDocumentName`: Specify the old document name. + +`newDocumentName`: Specify the new document name. + **Availability** +
@@ -2279,28 +2297,20 @@ RenameDocument(oldDocumentName:string, newDocumentName:string):boolean; ## RemoveDocument +Delete the specified document. + **Syntax** -
->- v17.3 ->- v17.2.5 -> -> ```typescript -/** - * Delete the specified document. - * @argument documentName Specify the document name. - */ RemoveDocument(documentName:string):boolean; ``` -```typescript -/** - * Delete the specified category and all images in it. - * @argument categoryName Specify the category name. - */ -RemoveFile(categoryName:string):boolean; -``` + +**Parameters** + +`documentName`: Specify the document name. + **Availability** +
@@ -2327,37 +2337,21 @@ RemoveFile(categoryName:string):boolean; ## GetDocumentInfoList +Get the list of all documents and their information. + **Syntax** -
->- v17.3 ->- v17.2.5 -> -> ```typescript -/** - * Get the list of all documents and their information. - */ GetDocumentInfoList(): DocumentInfo[]; interface DocumentInfo { name: string; imageIds: number[]; } ``` -```typescript -/** - * Get the list of all categories and their information. - */ -GetFileInfoList():Json -Json: -[{ - name: "categoryName", - imageIds:[23122335, 25566822323] -}, -{……}] -``` + **Availability** +
From a2810d6b3b276a7fae5dec6d63ef4e6f97e35e5b Mon Sep 17 00:00:00 2001 From: ztyyLV <97287824+ztyyLV@users.noreply.github.com> Date: Mon, 27 Mar 2023 18:41:19 +0800 Subject: [PATCH 2/7] revise --- info/api/WebTwain_Acquire.md | 383 +++++++++++++++++++---------------- info/api/WebTwain_Buffer.md | 5 - 2 files changed, 214 insertions(+), 174 deletions(-) diff --git a/info/api/WebTwain_Acquire.md b/info/api/WebTwain_Acquire.md index d287c0ee..695acf68 100644 --- a/info/api/WebTwain_Acquire.md +++ b/info/api/WebTwain_Acquire.md @@ -319,16 +319,16 @@ function AcquireImage4() { ## CloseSource +Close the data source (a TWAIN/ICA/SANE device which in most cases is a scanner) to free it to be used by other applications. + **Syntax** ```typescript -/** - * Close the data source (a TWAIN/ICA/SANE device which in most cases is a scanner) to free it to be used by other applications. - */ CloseSource(): boolean; ``` **Availability** +
@@ -355,16 +355,16 @@ CloseSource(): boolean; ## CloseSourceAsync +Close the data source (a TWAIN/ICA/SANE device which in most cases is a scanner) to free it to be used by other applications. + **Syntax** ```typescript -/** - * Close the data source (a TWAIN/ICA/SANE device which in most cases is a scanner) to free it to be used by other applications. - */ CloseSourceAsync(): Promise; ``` **Availability** +
@@ -391,16 +391,16 @@ CloseSourceAsync(): Promise; ## DisableSource +Disable the data source (a TWAIN/ICA/SANE device which in most cases is a scanner) to stop the acquiring process. If the data source's user interface is displayed, it will be closed. + **Syntax** ```typescript -/** - * Disable the data source (a TWAIN/ICA/SANE device which in most cases is a scanner) to stop the acquiring process. If the data source's user interface is displayed, it will be closed. - */ DisableSource(): boolean; ``` **Availability** +
@@ -431,16 +431,16 @@ After `DisableSource()` is called, the Source is still open and you can continue ## EnableSource +Enable the data source to start the acquiring process. + **Syntax** ```typescript -/** - * Enable the data source to start the acquiring process. - */ EnableSource(): boolean; ``` **Availability** +
@@ -471,23 +471,27 @@ The method is equivalent to `AcquireImage()` without parameters. ## EnableSourceUI +Display the TWAIN source's built-in user interface. + **Syntax** ```typescript -/** - * Display the TWAIN source's built-in user interface. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - */ EnableSourceUI( successCallBack: () => void, - failureCallBack: ( - errorCode: number, - errorString: string) => void + failureCallBack: (errorCode: number, errorString: string) => void ): void; ``` +**Parameters** + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
@@ -518,16 +522,16 @@ This method enables the user to manipulate the settings for scanning but not sta ## OpenSource +Load a data source to get it ready to acquire images. + **Syntax** ```typescript -/** - * Load a data source to get it ready to acquire images. - */ OpenSource(): boolean; ``` **Availability** +
@@ -554,16 +558,16 @@ OpenSource(): boolean; ## OpenSourceAsync +Load a data source to get it ready to acquire images. + **Syntax** ```typescript -/** - * Load a data source to get it ready to acquire images. - */ OpenSourceAsync(): Promise; ``` **Availability** +
@@ -590,13 +594,11 @@ OpenSourceAsync(): Promise; ## GetSourceNames +Return all available data sources (scanners, etc.) and optionally all detailed information about them. + **Syntax** ```typescript -/** - * Return all available data sources (scanners, etc.) and optionally all detailed information about them. - * @param bIncludeDetails Whether to return more details about the data sources or just their names. - */ GetSourceNames(bIncludeDetails?: boolean): string[] | SourceDetails[]; interface SourceDetails { @@ -651,7 +653,12 @@ interface Version { } ``` +**Parameters** + +`bIncludeDetails`: Whether to return more details about the data sources or just their names. + **Availability** +
@@ -673,21 +680,25 @@ interface Version {
+ --- ## GetSourceNamesAsync +Return all available data sources (scanners, etc.) and optionally all detailed information about them. + **Syntax** ```typescript -/** - * Return all available data sources (scanners, etc.) and optionally all detailed information about them. - * @param bIncludeDetails Whether to return more details about the data sources or just their names. - */ GetSourceNamesAsync(bIncludeDetails: boolean): Promise; ``` +**Parameters** + +`bIncludeDetails`: Whether to return more details about the data sources or just their names. + **Availability** +
@@ -714,23 +725,27 @@ GetSourceNamesAsync(bIncludeDetails: boolean): Promise void, failureCallBack?: (errorCode: number, errorString: string) => void ): boolean | void; ``` +**Parameters** + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
@@ -786,7 +801,7 @@ SelectSourceAsync(deviceType?: Dynamsoft.DWT.EnumDWT_DeviceType | number): Promi **Parameters** -`deviceType`: Specify the device type of scanners. Please refer to [EnumDWT_DeviceType]({{{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_devicetype). +`deviceType`: Specify the device type of scanners. Please refer to [EnumDWT_DeviceType]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_devicetype). **Availability**
@@ -827,17 +842,20 @@ DWObject.SelectSourceAsync() ## SelectSourceByIndex +Select a data source by its index. + **Syntax** ```typescript -/** - * Select a data source by its index. - * @param index The index of the data source. - */ SelectSourceByIndex(index: number): boolean; ``` +**Parameters** + +`index`: The index of the data source. + **Availability** +
@@ -872,17 +890,20 @@ DWObject.AcquireImage(); ## SelectSourceByIndexAsync +Select a data source by its index. + **Syntax** ```typescript -/** - * Select a data source by its index. - * @param index The index of the data source. - */ SelectSourceByIndexAsync(index: number): Promise; ``` +**Parameters** + +`index`: The index of the data source. + **Availability** +
@@ -921,17 +942,20 @@ DWObject.SelectSourceByIndexAsync(0) ## SetOpenSourceTimeout +Sets a timer which stops the data source opening process once it expires. + **Syntax** ```typescript -/** - * Sets a timer which stops the data source opening process once it expires. - * @param duration Define the duration of the timer (in milliseconds). - */ SetOpenSourceTimeout(duration: number): boolean; ``` +**Parameters** + +`duration`: Define the duration of the timer (in milliseconds). + **Availability** +
@@ -968,13 +992,11 @@ DWObject.SelectSource(function () { ## startScan +Start the acquisition by passing all settings at once. + **Syntax** ```typescript -/** - * Start the acquisition by passing all settings at once. - * @param scanSetup Configuration for the acquisition. - */ startScan(scanSetup: ScanSetup): Promise; interface ScanSetup { @@ -1238,7 +1260,12 @@ interface ScanSetup { } ``` +**Parameters** + +`scanSetup`: Configuration for the acquisition. + **Availability** +
@@ -1269,12 +1296,11 @@ interface ScanSetup { ## CancelAllPendingTransfers +Cancels all pending transfers. + **Syntax** ```typescript -/** - * Cancels all pending transfers. - */ CancelAllPendingTransfers(): boolean; ``` @@ -1309,16 +1335,16 @@ This method is only valid in the events [OnPreAllTransfers](#onprealltransfers), ## CloseSourceManager +Closes and unloads Data Source Manager. + **Syntax** ```typescript -/** - * Closes and unloads Data Source Manager. - */ CloseSourceManager(): boolean; ``` **Availability** +
@@ -1344,16 +1370,16 @@ CloseSourceManager(): boolean; ## CloseSourceManagerAsync +Closes and unloads Data Source Manager. + **Syntax** ```typescript -/** - * Closes and unloads Data Source Manager. - */ CloseSourceManagerAsync(): Promise; ``` **Availability** +
@@ -1380,16 +1406,16 @@ CloseSourceManagerAsync(): Promise; ## CloseWorkingProcess +Closes the scanning process to release resources on the machine. + **Syntax** ```typescript -/** - * Closes the scanning process to release resources on the machine. - */ CloseWorkingProcess(): boolean; ``` **Availability** +
@@ -1420,16 +1446,16 @@ In the HTML5 edition, Dynamic Web TWAIN uses a separate process to communicate w ## FeedPage +Ejects the current page and begins scanning the next page in the document feeder. + **Syntax** ```typescript -/** - * Ejects the current page and begins scanning the next page in the document feeder. - */ FeedPage(): boolean; ``` **Availability** +
@@ -1460,17 +1486,20 @@ Use this method after [OpenSource()](#opensource) is called and make sure [IfFee ## GetCustomDSData +Get the custom data source data and saves the data in a specified file. + **Syntax** ```typescript -/** - * Get the custom data source data and saves the data in a specified file. - * @param fileName The path of the file to save the data source data to. - */ GetCustomDSData(fileName: string): boolean; ``` +**Parameters** + +`fileName`: The path of the file to save the data source data to. + **Availability** +
@@ -1503,16 +1532,16 @@ DWObject.GetCustomDSData("C:\\customDSData"); ## GetCustomDSDataEx +Gets custom DS data and returns it in a base64 string. + **Syntax** ```typescript -/** - * Gets custom DS data and returns it in a base64 string. - */ GetCustomDSDataEx(): string; ``` **Availability** +
@@ -1539,17 +1568,20 @@ GetCustomDSDataEx(): string; ## GetSourceNameItems +Get the name of a data source by its index in data source manager source list. + **Syntax** ```typescript -/** - * Get the name of a data source by its index in data source manager source list. - * @param index The index of the data source. - */ GetSourceNameItems(index: number): string; ``` +**Parameters** + +`index`: The index of the data source. + **Availability** +
@@ -1576,16 +1608,16 @@ GetSourceNameItems(index: number): string; ## OpenSourceManager +Load and open data source manager. + **Syntax** ```typescript -/** - * Load and open data source manager. - */ OpenSourceManager(): boolean; ``` **Availability** +
@@ -1616,12 +1648,11 @@ If application identification needs to be set, it should be set before this API. ## OpenSourceManagerAsync +Load and open data source manager. + **Syntax** ```typescript -/** - * Load and open data source manager. - */ OpenSourceManagerAsync(): Promise; ``` @@ -1656,16 +1687,16 @@ If application identification needs to be set, it should be set before this API. ## ResetImageLayout +Reset the image layout in the data source. + **Syntax** ```typescript -/** - * Reset the image layout in the data source. - */ ResetImageLayout(): boolean; ``` **Availability** +
@@ -1696,16 +1727,16 @@ To set the image layout manually, you can use [SetImageLayout()](#setimagelayout ## RewindPage +If called while {IfFeederEnabled} property is true, the data source will return the current page to the input area and return the last page from the output area into the acquisition area. + **Syntax** ```typescript -/** - * If called while {IfFeederEnabled} property is true, the data source will return the current page to the input area and return the last page from the output area into the acquisition area. - */ RewindPage(): boolean; ``` **Availability** +
@@ -1736,17 +1767,20 @@ Use this method after [OpenSource()](#opensource) method and make sure [IfFeeder ## SetCustomDSData +Sets custom data source data to be used for scanning, the data is stored in a file which can be regarded as a scanning profile. + **Syntax** ```typescript -/** - * Sets custom data source data to be used for scanning, the data is stored in a file which can be regarded as a scanning profile. - * @param fileName The path of the file. - */ SetCustomDSData(fileName: string): boolean; ``` +**Parameters** + +`fileName`: The path of the file. + **Availability** +
@@ -1777,17 +1811,20 @@ Typically, the data source data file is created by the method [GetCustomDSData() ## SetCustomDSDataEx +Set custom data source data to be used for scanning, the input is a base64 string. + **Syntax** ```typescript -/** - * Set custom data source data to be used for scanning, the input is a base64 string. - * @param dsDataString The string that contains custom data source data. - */ SetCustomDSDataEx(dsDataString: string): boolean; ``` +**Parameters** + +`dsDataString`: The string that contains custom data source data. + **Availability** +
@@ -1818,21 +1855,25 @@ Typically the data source data string is created by the method [GetCustomDSDataE ## SetFileXferInfo +Set the file transfer information to be used in File Transfer mode. + **Syntax** ```typescript -/** - * Set the file transfer information to be used in File Transfer mode. - * @param fileName The path to transfer the file to. - * @param fileFormat The format of the file. - */ SetFileXferInfo( fileName: string, fileFormat: Dynamsoft.DWT.EnumDWT_FileFormat | number ): boolean; ``` +**Parameters** + +`fileName`: The path to transfer the file to. + +`fileFormat`: The format of the file. + **Availability** +
@@ -1889,16 +1930,11 @@ if (DWObject.TransferMode === Dynamsoft.DWT.EnumDWT_TransferMode.TWSX_FILE) { ## SetImageLayout +Set the left, top, right, and bottom sides of the image layout rectangle for the current data source. The image layout rectangle defines a frame of the data source's scanning area to be acquired. + **Syntax** ```typescript -/** - * Set the left, top, right, and bottom sides of the image layout rectangle for the current data source. The image layout rectangle defines a frame of the data source's scanning area to be acquired. - * @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). - */ SetImageLayout( left: number, top: number, @@ -1907,7 +1943,18 @@ SetImageLayout( ): boolean; ``` +**Parameters** + +`left`: Specify the rectangle (leftmost coordinate). + +`top`: Specify the rectangle (topmost coordinate). + +`right`: Specify the rectangle (rightmost coordinate). + +`bottom`: Specify the rectangle (bottommost coordinate). + **Availability** +
@@ -1959,16 +2006,16 @@ DWObject.AcquireImage(); ## BitDepth +Return or set the pixel bit depth for the current value of `PixelType` . + **Syntax** ```typescript -/** - * Return or set the pixel bit depth for the current value of `PixelType` . - */ BitDepth: number; ``` **Availability** +
@@ -2001,16 +2048,16 @@ By default, the bit depth is 1 for `TWPT_BW` , 8 for `TWPT_GRAY` and 24 for `TWP ## IfAppendImage +Return or set whether newly acquired images are inserted or appended. + **Syntax** ```typescript -/** - * Return or set whether newly acquired images are inserted or appended. - */ IfAppendImage: boolean; ``` **Availability** +
@@ -2043,17 +2090,16 @@ If it's set to `false` , the images will be inserted before the current image. T ## IfDisableSourceAfterAcquire -**Syntax** +Return or set whether to close the built-in User Interface after all images have been acquired. -``` +**Syntax** -/** - * Return or set whether to close the built-in User Interface after all images have been acquired. - */ +```javascript IfDisableSourceAfterAcquire: boolean; ``` **Availability** +
@@ -2084,16 +2130,16 @@ This property only makes sense when `IfShowUI` is set to `true` . ## IfDuplexEnabled +Return or set whether to enable duplex scanning (in other words, whether to scan both sides of the paper). + **Syntax** ```typescript -/** - * Return or set whether to enable duplex scanning (in other words, whether to scan both sides of the paper). - */ IfDuplexEnabled: boolean; ``` **Availability** +
@@ -2126,16 +2172,16 @@ Not all scanners support duplex scanning. To confirm, check the user manual of t ## IfFeederEnabled +Return or set whether a data source's Automatic Document Feeder (ADF) is enabled for scanning. + **Syntax** ```typescript -/** - * Return or set whether a data source's Automatic Document Feeder (ADF) is enabled for scanning. - */ IfFeederEnabled: boolean; ``` **Availability** +
@@ -2168,12 +2214,11 @@ If the property is set to `true` , the data source will try acquiring images fro ## IfShowUI +Return or set whether the data source displays the user interface when scanning. + **Syntax** ```typescript -/** - * Return or set whether the data source displays the user interface when scanning. - */ IfShowUI: boolean; ``` @@ -2210,16 +2255,16 @@ It's recommended to use this API after OpenSource() is called. ## ImageCaptureDriverType +Return or set the driver type which determines the type of sources to use. + **Syntax** ```typescript -/** - * Return or set the driver type which determines the type of sources to use. - */ ImageCaptureDriverType: Dynamsoft.DWT.EnumDWT_Driver | number; ``` **Availability** +
@@ -2261,16 +2306,16 @@ The allowed values for `EnumDWT_Driver` are ## PageSize +Return or set the page size the data source uses to acquire images. + **Syntax** ```typescript -/** - * Return or set the page size the data source uses to acquire images. - */ PageSize: Dynamsoft.DWT.EnumDWT_CapSupportedSizes | number; ``` **Availability** +
@@ -2301,16 +2346,16 @@ Set this property after `OpenSource()` and before `AcquireImage()`. ## PixelType +Return or set the pixel type used when acquiring images. + **Syntax** ```typescript -/** - * Return or set the pixel type used when acquiring images. - */ PixelType: Dynamsoft.DWT.EnumDWT_PixelType | number; ``` **Availability** +
@@ -2341,16 +2386,16 @@ Set this property after `OpenSource()` and before `AcquireImage()`. ## Resolution +Return or set the resolution used when acquiring images. + **Syntax** ```typescript -/** - * Return or set the resolution used when acquiring images. - */ Resolution: number; ``` **Availability** +
@@ -2381,16 +2426,16 @@ Set this property after `OpenSource()` and before `AcquireImage()`. ## SourceCount +Returns how many data sources are available on the local system. + **Syntax** ```typescript -/** - * Returns how many data sources are available on the local system. - */ readonly SourceCount: number; ``` **Availability** +
@@ -2417,16 +2462,16 @@ readonly SourceCount: number; ## BlankImageThreshold +Retrun or set the dividing line between black and white. + **Syntax** ```typescript -/** - * Retrun or set the dividing line between black and white. - */ BlankImageThreshold: number; ``` **Availability** +
@@ -2457,16 +2502,16 @@ BlankImageThreshold: number; ## Brightness +Return or set the brightness to be used for scanning by the data source. + **Syntax** ```typescript -/** - * Return or set the brightness to be used for scanning by the data source. - */ Brightness: number; ``` **Availability** +
@@ -2499,16 +2544,16 @@ Typically, the value range is -1000 ~ 1000 where -1000 indicates the darkest and ## Contrast +Return or set Contrast to be used for scanning by the data source. + **Syntax** ```typescript -/** - * Return or set Contrast to be used for scanning by the data source. - */ Contrast: number; ``` **Availability** +
@@ -2541,16 +2586,16 @@ Typically, the value range is -1000 ~ 1000 where -1000 indicates the darkest and ## CurrentSourceName +Return the device name of current source. + **Syntax** ```typescript -/** - * Return the device name of current source. - */ readonly CurrentSourceName: string; ``` **Availability** +
@@ -2581,16 +2626,16 @@ If no source is currently selected, this property returns "". ## DataSourceStatus +Return a value that indicates the data source status. + **Syntax** ```typescript -/** - * Return a value that indicates the data source status. - */ DataSourceStatus: number; ``` **Availability** +
@@ -2626,16 +2671,16 @@ DataSourceStatus: number; ## DefaultSourceName +Return the name of the last used source. + **Syntax** ```typescript -/** - * Return the name of the last used source. - */ DefaultSourceName: string; ``` **Availability** +
diff --git a/info/api/WebTwain_Buffer.md b/info/api/WebTwain_Buffer.md index 5dd22f41..a2974441 100644 --- a/info/api/WebTwain_Buffer.md +++ b/info/api/WebTwain_Buffer.md @@ -183,11 +183,6 @@ Remove the specified tag from one or more images(if not specified, remove from a **Syntax** ```typescript -/** - * - * @param tagName Specify the new tag name. - * @param indices Specify the index. - */ RemoveTag(tagName: string, indices?: number[]):boolean ``` From ba7b44d7cc93a9cb4ca8876b974e04f38b1a0873 Mon Sep 17 00:00:00 2001 From: ztyyLV <97287824+ztyyLV@users.noreply.github.com> Date: Tue, 28 Mar 2023 11:39:53 +0800 Subject: [PATCH 3/7] Update WebTwain_Acquire.md --- info/api/WebTwain_Acquire.md | 195 +++++++++++++++++------------------ 1 file changed, 96 insertions(+), 99 deletions(-) diff --git a/info/api/WebTwain_Acquire.md b/info/api/WebTwain_Acquire.md index 695acf68..3558066b 100644 --- a/info/api/WebTwain_Acquire.md +++ b/info/api/WebTwain_Acquire.md @@ -2707,16 +2707,16 @@ DefaultSourceName: string; ## Duplex +Return whether the source supports duplex. If yes, it further returns the level of duplex the data source supports. + **Syntax** ```typescript -/** - * Return whether the source supports duplex. If yes, it further returns the level of duplex the data source supports. - */ readonly Duplex: Dynamsoft.DWT.EnumDWT_DUPLEX | number; ``` **Availability** +
@@ -2755,16 +2755,16 @@ This property does not support Linux. ## IfAutoBright +Return or set whether to enable the data source's auto-brightness feature. + **Syntax** ```typescript -/** - * Return or set whether to enable the data source's auto-brightness feature. - */ IfAutoBright: boolean; ``` **Availability** +
@@ -2791,16 +2791,16 @@ IfAutoBright: boolean; ## IfAutoDiscardBlankpages +Return or set whether the data source (the scanner) discards blank images during scanning automatically. + **Syntax** ```typescript -/** - * Return or set whether the data source (the scanner) discards blank images during scanning automatically. - */ IfAutoDiscardBlankpages: boolean; ``` **Availability** +
@@ -2833,16 +2833,16 @@ Alternatively, the Dynamic Web TWAIN library can also detect blank images after ## IfAutoFeed +Return or set whether to enable the data source's automatic document feeding process. + **Syntax** ```typescript -/** - * Return or set whether to enable the data source's automatic document feeding process. - */ IfAutoFeed: boolean; ``` **Availability** +
@@ -2873,16 +2873,16 @@ If set to `true` , the data source will automatically feed the next page from th ## IfAutomaticBorderDetection +Return or set whether to enable the data source's automatic border detection feature. + **Syntax** ```typescript -/** - * Return or set whether to enable the data source's automatic border detection feature. - */ IfAutomaticBorderDetection: boolean; ``` **Availability** +
@@ -2915,16 +2915,16 @@ Once enabled, the data source (scanner) will automatically detect the borders of ## IfAutomaticDeskew +Return or set whether to enable the data source's automatic skew correction feature. + **Syntax** ```typescript -/** - * Return or set whether to enable the data source's automatic skew correction feature. - */ IfAutomaticDeskew: boolean; ``` **Availability** +
@@ -2955,16 +2955,16 @@ The property works only if the device and its driver supports automatical deskew ## IfAutoScan +Return or set whether to enable the data source's automatic document scanning process. + **Syntax** ```typescript -/** - * Return or set whether to enable the data source's automatic document scanning process. - */ IfAutoScan: boolean; ``` **Availability** +
@@ -2997,16 +2997,16 @@ The fundamental assumption behind this property is that the device may be able t ## IfFeederLoaded +Return whether or not there are documents loaded in the data source's feeder. + **Syntax** ```typescript -/** - * Return whether or not there are documents loaded in the data source's feeder. - */ readonly IfFeederLoaded: boolean; ``` **Availability** +
@@ -3037,16 +3037,16 @@ This property is only valid when [IfFeederEnabled](#iffeederenabled) and [IfPa ## IfPaperDetectable +Return whether the Source has a paper sensor that can detect pages on the ADF or Flatbed. + **Syntax** ```typescript -/** - * Return whether the Source has a paper sensor that can detect pages on the ADF or Flatbed. - */ readonly IfPaperDetectable: boolean; ``` **Availability** +
@@ -3077,12 +3077,11 @@ Check this property after [OpenSource()](#opensource) is called. ## IfShowIndicator +Return or set whether the data source displays a progress indicator during acquisition and transfer. + **Syntax** ```typescript -/** - * Return or set whether the data source displays a progress indicator during acquisition and transfer. - */ IfShowIndicator: boolean; ``` @@ -3119,16 +3118,16 @@ The indicator will only be hidden if you set both [IfShowUI](#ifshowui) and [IfS ## IfUIControllable +Return whether the data source supports acquisitions with the UI (User Interface) disabled. + **Syntax** ```typescript -/** - * Return whether the data source supports acquisitions with the UI (User Interface) disabled. - */ readonly IfUIControllable: boolean; ``` **Availability** +
@@ -3159,16 +3158,16 @@ Check this property after [OpenSource()](#opensource) is called. ## IfUseTwainDSM +Return or set whether the new TWAIN DSM (data source Manager) is used for acquisitions. The new TWAIN DSM is a DLL called 'TWAINDSM.dll' while the default | old DSM is called 'twain_32.dll'. + **Syntax** ```typescript -/** - * Return or set whether the new TWAIN DSM (data source Manager) is used for acquisitions. The new TWAIN DSM is a DLL called 'TWAINDSM.dll' while the default | old DSM is called 'twain_32.dll'. - */ IfUseTwainDSM: boolean; ``` **Availability** +
@@ -3199,16 +3198,16 @@ This property should be set before any TWAIN related methods or properties are c ## ImageLayoutFrameBottom +Return the value of the bottom edge of the current image frame (in Unit). + **Syntax** ```typescript -/** - * Return the value of the bottom edge of the current image frame (in Unit). - */ readonly ImageLayoutFrameBottom: number; ``` **Availability** +
@@ -3235,16 +3234,16 @@ readonly ImageLayoutFrameBottom: number; ## ImageLayoutFrameLeft +Return the value of the left edge of the current image frame (in Unit). + **Syntax** ```typescript -/** - * Return the value of the left edge of the current image frame (in Unit). - */ readonly ImageLayoutFrameLeft: number; ``` **Availability** +
@@ -3271,16 +3270,16 @@ readonly ImageLayoutFrameLeft: number; ## ImageLayoutFrameRight +Return the value of the right edge of the current image frame (in Unit). + **Syntax** ```typescript -/** - * Return the value of the right edge of the current image frame (in Unit). - */ readonly ImageLayoutFrameRight: number; ``` **Availability** +
@@ -3307,16 +3306,16 @@ readonly ImageLayoutFrameRight: number; ## ImageLayoutFrameTop +Return the value of the top edge of the current image frame (in Unit). + **Syntax** ```typescript -/** - * Return the value of the top edge of the current image frame (in Unit). - */ readonly ImageLayoutFrameTop: number; ``` **Availability** +
@@ -3343,16 +3342,16 @@ readonly ImageLayoutFrameTop: number; ## ImageLayoutDocumentNumber +Return the document number of the current image. + **Syntax** ```typescript -/** - * Return the document number of the current image. - */ readonly ImageLayoutDocumentNumber: number; ``` **Availability** +
@@ -3379,16 +3378,16 @@ readonly ImageLayoutDocumentNumber: number; ## ImageLayoutPageNumber +Return the page number of the current image. + **Syntax** ```typescript -/** - * Return the page number of the current image. - */ readonly ImageLayoutPageNumber: number; ``` **Availability** +
@@ -3415,16 +3414,16 @@ readonly ImageLayoutPageNumber: number; ## ImageBitsPerPixel +Return the bit depth of the current image. + **Syntax** ```typescript -/** - * Return the bit depth of the current image. - */ readonly ImageBitsPerPixel: number; ``` **Availability** +
@@ -3451,16 +3450,16 @@ readonly ImageBitsPerPixel: number; ## ImageLength +Return the length of the current image. + **Syntax** ```typescript -/** - * Return the length of the current image. - */ readonly ImageLength: number; ``` **Availability** +
@@ -3487,12 +3486,11 @@ readonly ImageLength: number; ## ImageWidth +Return the width of the current image. + **Syntax** ```typescript -/** - * Return the width of the current image. - */ readonly ImageWidth: number; ``` @@ -3523,12 +3521,11 @@ readonly ImageWidth: number; ## ImageXResolution +Return the horizontal resolution of the current image. + **Syntax** ```typescript -/** - * Return the horizontal resolution of the current image. - */ readonly ImageXResolution: number; ``` @@ -3559,16 +3556,16 @@ readonly ImageXResolution: number; ## ImageYResolution +Return the vertical resolution of the current image. + **Syntax** ```typescript -/** - * Return the vertical resolution of the current image. - */ readonly ImageYResolution: number; ``` **Availability** +
@@ -3595,16 +3592,16 @@ readonly ImageYResolution: number; ## ImagePixelType +Return the pixel type of the current image. + **Syntax** ```typescript -/** - * Return the pixel type of the current image. - */ readonly ImagePixelType: Dynamsoft.DWT.EnumDWT_PixelType | number; ``` **Availability** +
@@ -3631,16 +3628,16 @@ readonly ImagePixelType: Dynamsoft.DWT.EnumDWT_PixelType | number; ## MagData +Return the data of the magnetic data if the data source supports magnetic data recognition. + **Syntax** ```typescript -/** - * Return the data of the magnetic data if the data source supports magnetic data recognition. - */ readonly MagData: string; ``` **Availability** +
@@ -3667,16 +3664,16 @@ readonly MagData: string; ## MagType +Return the type of the magnetic data if the data source supports magnetic data recognition. + **Syntax** ```typescript -/** - * Return the type of the magnetic data if the data source supports magnetic data recognition. - */ readonly MagType: Dynamsoft.DWT.EnumDWT_MagType | number; ``` **Availability** +
@@ -3711,16 +3708,16 @@ These APIs are only valid in the callbacks for the events [OnPreTransfer](#onpre ## PendingXfers +Return the number of transfers the data source is ready to supply upon demand. + **Syntax** ```typescript -/** - * Return the number of transfers the data source is ready to supply upon demand. - */ readonly PendingXfers: number; ``` **Availability** +
@@ -3753,16 +3750,16 @@ The data source returns -1 if it is not sure how many transfers are pending whic ## PixelFlavor +Return or set the pixel flavor to be used for acquiring images. + **Syntax** ```typescript -/** - * Return or set the pixel flavor to be used for acquiring images. - */ PixelFlavor: number; ``` **Availability** +
@@ -3796,16 +3793,16 @@ Available values: ## TransferMode +Return or set the data source's transfer mode. + **Syntax** ```typescript -/** - * Return or set the data source's transfer mode. - */ TransferMode: Dynamsoft.DWT.EnumDWT_TransferMode | number; ``` **Availability** +
@@ -3842,16 +3839,16 @@ TWSX_NATIVE and TWSX_MEMORY are required by all TWAIN data sources while TWSX_FI ## Unit +Return or set the unit of measure for all quantities. Note that this setting is only effective for TWAIN (hardware) related operations. + **Syntax** ```typescript -/** - * Return or set the unit of measure for all quantities. Note that this setting is only effective for TWAIN (hardware) related operations. - */ Unit: Dynamsoft.DWT.EnumDWT_UnitType | number; ``` **Availability** +
@@ -3892,16 +3889,16 @@ Allowed values are ## XferCount +Return and set the number of images your application is willing to accept for each scan job. + **Syntax** ```typescript -/** - * Return and set the number of images your application is willing to accept for each scan job. - */ XferCount: number; ``` **Availability** +
@@ -3932,16 +3929,16 @@ Allowed values are between -1 and 215 where -1 indicate multiple images. ## OnPostAllTransfers +This event is triggered when all page(s) have been scanned and transferred. + **Syntax** ```typescript -/** - * This event is triggered when all page(s) have been scanned and transferred. - */ RegisterEvent("OnPostAllTransfers", function () {}); ``` **Availability** +
@@ -3980,16 +3977,16 @@ DWObject.RegisterEvent("OnPostAllTransfers", function () { ## OnPostTransfer +This event is triggered after each page has been scanned and transferred. + **Syntax** ```typescript -/** - * This event is triggered after each page has been scanned and transferred. - */ RegisterEvent("OnPostTransfer", function () {}); ``` **Availability** +
From 138773cff4bc9f4c6e3cb6c430cdcba02a2279a3 Mon Sep 17 00:00:00 2001 From: ztyyLV <97287824+ztyyLV@users.noreply.github.com> Date: Tue, 28 Mar 2023 13:38:53 +0800 Subject: [PATCH 4/7] Update WebTwain_Acquire.md --- info/api/WebTwain_Acquire.md | 129 ++++++++++++++++++++--------------- 1 file changed, 74 insertions(+), 55 deletions(-) diff --git a/info/api/WebTwain_Acquire.md b/info/api/WebTwain_Acquire.md index 3558066b..2cc88763 100644 --- a/info/api/WebTwain_Acquire.md +++ b/info/api/WebTwain_Acquire.md @@ -4021,17 +4021,20 @@ DWObject.RegisterEvent("OnPostTransfer", function () { ## OnPostTransferAsync +This event is triggered after each page has been scanned and transferred. This is the asynchronous counterpart to the synchronous event {OnPostTransfer}. + **Syntax** ```typescript -/** - * This event is triggered after each page has been scanned and transferred. This is the asynchronous counterpart to the synchronous event {OnPostTransfer}. - * @argument outputInfo Detailed information about the image that just got transferred. - */ RegisterEvent("OnPostTransferAsync", function (outputInfo: OutputInfo) {}); ``` +**Parameters** + +`outputInfo`: Detailed information about the image that just got transferred. + **Availability** +
@@ -4089,16 +4092,16 @@ DWObject.RegisterEvent("OnPostTransferAsync", function (outputInfo) { ## OnPreAllTransfers +This event is triggered when all images are scanned and ready to be transferred. + **Syntax** ```typescript -/** - * This event is triggered when all images are scanned and ready to be transferred. - */ RegisterEvent("OnPreAllTransfers", function () {}); ``` **Availability** +
@@ -4136,16 +4139,16 @@ In the callback function of this event, you can call `CancelAllPendingTransfers( ## OnPreTransfer +This event is triggered when a page has been scanned and is ready to be transferred. + **Syntax** ```typescript -/** - * This event is triggered when a page has been scanned and is ready to be transferred. - */ RegisterEvent('OnPreTransfer',function(){...}); ``` **Availability** +
@@ -4180,16 +4183,16 @@ In the callback function of this event, you can ## OnSourceUIClose +This event is triggered when the user interface of the data source is closed manually by the user. + **Syntax** ```typescript -/** - * This event is triggered when the user interface of the data source is closed manually by the user. - */ RegisterEvent("OnSourceUIClose", function () {}); ``` **Availability** +
@@ -4216,23 +4219,14 @@ RegisterEvent("OnSourceUIClose", function () {}); ## getCapabilities +Gets detailed information about all capabilities of the current data source. + **Syntax** ```typescript -/** - * Gets detailed information about all capabilities of the current data source. - * @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 capabilityDetails Detailed information about the specified capabilities. - * @argument errorCode The error code. - * @argument errorString The error string. - */ getCapabilities( successCallback: (capabilityDetails: CapabilityDetails[]) => void, - failureCallback: ( - errorCode: number, - errorString: string - ) => void + failureCallback: (errorCode: number, errorString: string) => void ): void; /** @@ -4298,7 +4292,17 @@ interface ValueAndLabel { } ``` +**Parameters** + +`successCallback`: A callback function that is executed if the request succeeds. +- `capabilityDetails`: Detailed information about the specified capabilities. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
@@ -4333,16 +4337,11 @@ Check out the Enumerations ## setCapabilities +Sets up one or multiple capabilities in one call. + **Syntax** ```typescript -/** - * Sets up one or multiple capabilities in one call. - * @param capabilities A object that describes how to set capabilities. - * @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 capabilities The capabilities to set. - */ setCapabilities( capabilities: Capabilities, successCallback: (capabilities: Capabilities) => void, @@ -4378,7 +4377,17 @@ interface CapabilitySetup { } ``` +**Parameters** + +`capabilities`: A object that describes how to set capabilities. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `capabilities`: The capabilities to set. + **Availability** +
@@ -4455,17 +4464,20 @@ DWObject.setCapabilities( ## GetDevicesAsync +Return all available devices (scanners, eSCL scanners, etc.) for the device type (if specified) + **Syntax** ```typescript -/** - * Return all available devices (scanners, eSCL scanners, etc.) for the device type (if specified) - * @param deviceType The device type - * @param refresh Default value: false - */ GetDevicesAsync(deviceType?: Dynamsoft.DWT.EnumDWT_DeviceType | number, refresh?:boolean): Promise; ``` +**Parameters** + +`deviceType`: The device type + +`refresh`: Default value is **false** + **Example** ```javascript @@ -4479,6 +4491,7 @@ DWObject.GetDevicesAsync().then((deviceList)=>{ ``` **Availability** +
@@ -4509,13 +4522,11 @@ DWObject.GetDevicesAsync().then((deviceList)=>{ ## SelectDeviceAsync +Select the device to use for scanning + **Syntax** ```typescript -/** - * Select the device to use for scanning - * @param device the device - */ SelectDeviceAsync(device: Device): Promise< boolean>; ``` @@ -4531,7 +4542,12 @@ DWObject.GetDevicesAsync().then((deviceList)=>{ }) ``` +**Parameters** + +`device`: the device + **Availability** +
@@ -4558,29 +4574,20 @@ DWObject.GetDevicesAsync().then((deviceList)=>{ ## AcquireImageAsync +Scan documents into another DWObject control. eSCL is not supported. + **Syntax** ```typescript -/** - * Scan documents into another DWObject control. eSCL is not supported. - * @param deviceConfiguration The device configuration - */ AcquireImageAsync(deviceConfiguration?: DeviceConfiguration): Promise< boolean>; ``` -**Example** +**Parameters** -```javascript -DWObject.GetDevicesAsync().then((deviceList)=>{ - return DWObject.SelectDeviceAsync(deviceList[0]) //Select the first device -}).then(()=>{ - return DWObject.AcquireImageAsync({}) -}).catch((e)=>{ - console.error(e) -}) -``` +`deviceConfiguration`: The device configuration **Availability** +
@@ -4602,3 +4609,15 @@ DWObject.GetDevicesAsync().then((deviceList)=>{
+ +**Example** + +```javascript +DWObject.GetDevicesAsync().then((deviceList)=>{ + return DWObject.SelectDeviceAsync(deviceList[0]) //Select the first device +}).then(()=>{ + return DWObject.AcquireImageAsync({}) +}).catch((e)=>{ + console.error(e) +}) +``` \ No newline at end of file From 0f630de013279a1394b0ae021c8cc68de1123ddb Mon Sep 17 00:00:00 2001 From: ztyyLV <97287824+ztyyLV@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:56:43 +0800 Subject: [PATCH 5/7] update --- info/api/WebTwain_Acquire.md | 22 +++++++++++++--------- info/api/WebTwain_Buffer.md | 1 - 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/info/api/WebTwain_Acquire.md b/info/api/WebTwain_Acquire.md index 2cc88763..c9a825ff 100644 --- a/info/api/WebTwain_Acquire.md +++ b/info/api/WebTwain_Acquire.md @@ -82,17 +82,11 @@ permalink: /info/api/WebTwain_Acquire.html ## AcquireImage +Start image acquisition. + **Syntax** ```typescript -/** - * Start image acquisition. - * @param deviceConfiguration Configuration for the acquisition. - * @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. - */ AcquireImage( deviceConfiguration?: DeviceConfiguration ): void; @@ -131,10 +125,20 @@ interface DeviceConfiguration { SelectSourceByIndex?: number; //Specify a source by its index. IfCloseSourceAfterAcquire?: boolean; //Whether to close the data source after aquisition. Default: false. } -} ``` +**Parameters** + +`deviceConfiguration`: Configuration for the acquisition. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
diff --git a/info/api/WebTwain_Buffer.md b/info/api/WebTwain_Buffer.md index a2974441..d989581d 100644 --- a/info/api/WebTwain_Buffer.md +++ b/info/api/WebTwain_Buffer.md @@ -235,7 +235,6 @@ interface TagInfo { name: string; imageIds: number[]; } - ``` **Availability** From 6c6c4e6912d389333e77c8a1823aad5a3296b021 Mon Sep 17 00:00:00 2001 From: ztyyLV <97287824+ztyyLV@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:03:43 +0800 Subject: [PATCH 6/7] update --- info/api/Device.md | 33 +++++++++++++++------------ info/api/Dynamsoft_WebTwainEnv.md | 38 +++++++++++++++++-------------- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/info/api/Device.md b/info/api/Device.md index fd296a3a..b6dd8565 100644 --- a/info/api/Device.md +++ b/info/api/Device.md @@ -39,14 +39,11 @@ interface Device { ## DeviceObject.acquireImage() +Scan documents into another DWObject control. Supports eSCL scanners and all other scanners with limited capabilities. + **Syntax** ```typescript -/** - * Scan documents into another DWObject control. Supports eSCL scanners and all other scanners with limited capabilities. - * @param deviceConfiguration The device configuration - * @param sendTo The DWObject control to scan into - */ acquireImage(deviceConfiguration: DeviceConfiguration | null, sendTo: WebTwain): Promise< boolean>; interface DeviceConfiguration { @@ -64,17 +61,11 @@ interface DeviceConfiguration { } ``` -**Example** +**Parameters** -```javascript -DWObject.GetDevicesAsync().then((deviceList)=>{ - return deviceList[0].acquireImage({},DWObject) -}).then((result)=>{ - console.log(result) -}).catch((e)=>{ - console.error(e) -}) -``` +`deviceConfiguration`: The device configuration + +`sendTo`: The DWObject control to scan into **Availability**
@@ -98,3 +89,15 @@ DWObject.GetDevicesAsync().then((deviceList)=>{
+ +**Example** + +```javascript +DWObject.GetDevicesAsync().then((deviceList)=>{ + return deviceList[0].acquireImage({},DWObject) +}).then((result)=>{ + console.log(result) +}).catch((e)=>{ + console.error(e) +}) +``` \ No newline at end of file diff --git a/info/api/Dynamsoft_WebTwainEnv.md b/info/api/Dynamsoft_WebTwainEnv.md index f363a22d..9631d8ac 100644 --- a/info/api/Dynamsoft_WebTwainEnv.md +++ b/info/api/Dynamsoft_WebTwainEnv.md @@ -82,12 +82,11 @@ UpdateCert( ## licenseException +Error message related to license. + **Syntax** ``` typescript -/** - * Error message related to license. - */ licenseException: string; ``` @@ -132,27 +131,32 @@ Sets or returns where the library looks for resources files including service in ### `UpdateCert` +Update and download certificate (server.pem.ldsc & server_key.pem.ldsc) to DynamsoftServicex64_17\cert. + **Syntax** ``` typescript -/** - * Update and download certificate (server.pem.ldsc & server_key.pem.ldsc) to DynamsoftServicex64_17\cert. - * @param url Url to download the new certificate. E.g. http://download.dynamsoft.com/cert.zip. server.pem.ldsc & server_key.pem.ldsc should be in cert.zip. - * @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. - */ UpdateCert( - url: string, - optionalAsyncSuccessFunc?: () => void, - optionalAsyncFailureFunc?: ( - errorCode: number, - errorString: string) => void - ); + url: string, + optionalAsyncSuccessFunc?: () => void, + optionalAsyncFailureFunc?: ( + errorCode: number, + errorString: string) => void +); ``` +**Parameters** + +`url`: Url to download the new certificate. E.g. http://download.dynamsoft.com/cert.zip. server.pem.ldsc & server_key.pem.ldsc should be in cert.zip. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
From d9553149d0643a6eb72172675c646a6f0e652005 Mon Sep 17 00:00:00 2001 From: ztyyLV <97287824+ztyyLV@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:34:52 +0800 Subject: [PATCH 7/7] Update WebTwain_Acquire.md --- info/api/WebTwain_Acquire.md | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/info/api/WebTwain_Acquire.md b/info/api/WebTwain_Acquire.md index c9a825ff..58d20e3e 100644 --- a/info/api/WebTwain_Acquire.md +++ b/info/api/WebTwain_Acquire.md @@ -86,30 +86,11 @@ Start image acquisition. **Syntax** -```typescript -AcquireImage( - deviceConfiguration?: DeviceConfiguration -): void; -``` - -```typescript - -AcquireImage( - successCallBack?: () => void, - failureCallBack?: ( - errorCode: number, - errorString: string) => void -): void; -``` - ```typescript AcquireImage( deviceConfiguration?: DeviceConfiguration, successCallBack?: () => void, - failureCallBack?: ( - deviceConfiguration?: DeviceConfiguration, - errorCode: number, - errorString: string) => void + failureCallBack?: (deviceConfiguration?: DeviceConfiguration, errorCode: number, errorString: string) => void ): void; interface DeviceConfiguration {