Skip to content

Commit 5cfe19b

Browse files
committed
Update WebTwain_Buffer.md
rewriting using category for clarity
1 parent 25780df commit 5cfe19b

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

info/api/WebTwain_Buffer.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@ Pair: [from: number, to: number];
22622262

22632263
```typescript
22642264
/**
2265-
* Return the tag of a specified image.
2265+
* Return the tag(s) of a specified image.
22662266
* @argument index Index of the image.
22672267
*/
22682268
GetTagListByIndex(index: number):string[]
@@ -2312,10 +2312,10 @@ DWObject.GetTagListByIndex(0);
23122312

23132313
```typescript
23142314
/**
2315-
* Create a file folder for image(s).
2316-
* @argument filename Specify the file name.
2315+
* Create a category for the scanned image(s).
2316+
* @argument categoryName Specify the category name.
23172317
*/
2318-
CreateFile(filename:string):Boolean;
2318+
CreateFile(categoryName:string):Boolean;
23192319
```
23202320

23212321
**Availability**
@@ -2351,9 +2351,9 @@ CreateFile(filename:string):Boolean;
23512351
**Example**
23522352

23532353
```javascript
2354-
//the image you scanned will belong to File1.
2355-
DWObject.CreateFile("File1");
2356-
DWObject.OpenFile("File1"); //Need to call OpenFile after CreateFile.
2354+
//Store the scanned image(s) under 'Category1'.
2355+
DWObject.CreateFile("Category1");
2356+
DWObject.OpenFile("Category1"); //Need to call OpenFile after CreateFile.
23572357
DWObject.AcquireImage(successCallback, failureCallback);
23582358

23592359
function successCallback() {
@@ -2367,8 +2367,8 @@ function failureCallback(errorCode, errorString) {
23672367

23682368
**Usage notes**
23692369

2370-
1. If the documents have been sorted before scanning, you can use <a href="{{site.info}}api/WebTwain_Buffer.html#createfile" target="_blank">CreateFile</a>, <a href="{{site.info}}api/WebTwain_Buffer.html#openfile" target="_blank">OpenFile</a> to manage each type of document.
2371-
2. If the documents are out of order before scanning and you want to scan them in first and then sort them, use tags to manage the documents. Relevant APIs: <a href="{{site.info}}api/WebTwain_Buffer.html#setdefaulttag" target="_blank">SetDefaultTag</a>, <a href="{{site.info}}api/WebTwain_Buffer.html#tagimages" target="_blank">TagImages</a>, <a href="{{site.info}}api/WebTwain_Buffer.html#gettaglist" target="_blank">GetTagList</a>, <a href="{{site.info}}api/WebTwain_Buffer.html#filterimagesbytag" target="_blank">FilterImagesByTag</a>
2370+
1. If the documents are already sorted before scanning, you can use <a href="{{site.info}}api/WebTwain_Buffer.html#createfile" target="_blank">CreateFile</a>, <a href="{{site.info}}api/WebTwain_Buffer.html#openfile" target="_blank">OpenFile</a> to group the documents.
2371+
2. If the documents are not already sorted before scanning and you want to first scan, then sort, you can use tags to manage that. Relevant APIs: <a href="{{site.info}}api/WebTwain_Buffer.html#setdefaulttag" target="_blank">SetDefaultTag</a>, <a href="{{site.info}}api/WebTwain_Buffer.html#tagimages" target="_blank">TagImages</a>, <a href="{{site.info}}api/WebTwain_Buffer.html#gettaglist" target="_blank">GetTagList</a>, <a href="{{site.info}}api/WebTwain_Buffer.html#filterimagesbytag" target="_blank">FilterImagesByTag</a>
23722372

23732373
---
23742374

@@ -2378,10 +2378,10 @@ function failureCallback(errorCode, errorString) {
23782378

23792379
```typescript
23802380
/**
2381-
* Open the specified file folder.
2382-
* @argument filename Specify the file name.
2381+
* Use the specified category for the scanned image(s)
2382+
* @argument categoryName Specify the category name.
23832383
*/
2384-
OpenFile(filename:string):Boolean;
2384+
OpenFile(categoryName:string):Boolean;
23852385
```
23862386

23872387
**Availability**
@@ -2417,10 +2417,11 @@ OpenFile(filename:string):Boolean;
24172417
**Example**
24182418

24192419
```javascript
2420-
DWObject.CreateFile("File1");
2421-
DWObject.CreateFile("File2");
2422-
DWObject.CreateFile("File3");
2423-
DWObject.OpenFile("File2"); //Need to call OpenFile after CreateFile.
2420+
//Stored the scanned image(s) under 'Category2'.
2421+
DWObject.CreateFile("Category1");
2422+
DWObject.CreateFile("Category2");
2423+
DWObject.CreateFile("Category3");
2424+
DWObject.OpenFile("Category2"); //Need to call OpenFile after CreateFile.
24242425
DWObject.AcquireImage(successCallback, failureCallback);
24252426

24262427
function successCallback() {
@@ -2440,7 +2441,7 @@ function failureCallback(errorCode, errorString) {
24402441

24412442
```typescript
24422443
/**
2443-
* Get the current file name. The default value is 'dynamsoft-dvs-file'.
2444+
* 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.
24442445
*/
24452446
GetCurrentFileName():String;
24462447
```
@@ -2483,10 +2484,10 @@ GetCurrentFileName():String;
24832484

24842485
```typescript
24852486
/**
2486-
* Remove all images in the specified file.
2487-
* @argument filename Specify the file name.
2487+
* Delete the specified category and all images in it.
2488+
* @argument categoryName Specify the category name.
24882489
*/
2489-
RemoveFile(filename:string):Boolean;
2490+
RemoveFile(categoryName:string):Boolean;
24902491
```
24912492

24922493
**Availability**
@@ -2527,13 +2528,13 @@ RemoveFile(filename:string):Boolean;
25272528

25282529
```typescript
25292530
/**
2530-
* Get the file info list.
2531+
* Get the list of all categories and their information.
25312532
*/
25322533
GetFileInfoList():Json
25332534

25342535
Json:
25352536
[{
2536-
name: "fileName",
2537+
name: "categoryName",
25372538
imageIds:[23122335, 25566822323]
25382539
},
25392540
{……}]

0 commit comments

Comments
 (0)