Skip to content

Commit 7255c35

Browse files
Merge pull request #14 from Dynamsoft/tom
changes approved
2 parents 8f5b56f + 9e1c7eb commit 7255c35

File tree

3 files changed

+66
-64
lines changed

3 files changed

+66
-64
lines changed

info/api/Addon_OCRPro.md

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Download(
5050
```
5151

5252
---
53+
5354
## IsModuleInstalled
5455

5556
**Syntax**
@@ -347,6 +348,7 @@ interface Redaction {
347348
**Usage notes**
348349

349350
A Settings object can be created with the following method.
351+
350352
``` typescript
351353
/**
352354
* Create a new "Settings" object.
@@ -366,29 +368,33 @@ The OCR Professional engine runs as a service. The workflow is like this
366368

367369
The following demonstrates the structures of the OCR Request and the Response.
368370

369-
### OCRPro.ServerSide.Request
371+
### OCRPro. ServerSide. Request
370372

371-
```javascript
373+
``` javascript
372374
{
373375
productKey: "***",
374376
inputFile: ["d:\\input\\test.tif"],
375377
outputFile: " d:\\temp\\ocrresult.pdf",
376-
zones: [[100, 100, 200, 300]],
377-
settings:
378-
{
379-
recognitionModule: "auto", /*optional*/
378+
zones: [
379+
[100, 100, 200, 300]
380+
],
381+
settings: {
382+
recognitionModule: "auto",
383+
/*optional*/
380384
languages: "eng,arabic",
381385
recognitionMethod: "File",
382-
threadCount: "2", /*optional*/
386+
threadCount: "2",
387+
/*optional*/
383388
outputFormat: "IOTPDF",
384-
pdfVersion: "1.7", /*optional*/
385-
pdfAVersion: "pdf/a-2a", /*optional*/
386-
redaction:
387-
{
389+
pdfVersion: "1.7",
390+
/*optional*/
391+
pdfAVersion: "pdf/a-2a",
392+
/*optional*/
393+
redaction: {
388394
"findText": "TWAIN",
389395
"findTextFlags": 1,
390396
"findTextAction": 0
391-
}
397+
}
392398
}
393399
}
394400
```
@@ -397,79 +403,75 @@ The following demonstrates the structures of the OCR Request and the Response.
397403
|:-|:-|
398404
| **productKey** | The product key which is generated from an OCR license. |
399405
| **inputFile** | Specify the files to be OCR'd. This is an array of strings which are absolute paths of the files. The supported formats are BMP, JPG, TIF, PDF, PNG, JBIG2, JPEG2000, PCX, etc. Please note the use of '\\\\' instead of just '\\'. |
400-
| **outputFile** | Specify where the output file is saved. If the input includes more than one file, all of them will be merged into one file. Otherwise, the result will only be returned in the [OCRPro.ServerSide.Response](#ocrproserversideresponse). |
401-
| **zones** | Specify which zones are to be OCR'd on an image. There can be multiple zones but it works only when the `recognitionMethod` is `Page`. The coordinates are in the sequence of `[[left, top, right, bottom]]`.|
406+
| **outputFile** | Specify where the output file is saved. If the input includes more than one file, all of them will be merged into one file. Otherwise, the result will only be returned in the [OCRPro. ServerSide. Response](#ocrproserversideresponse). |
407+
| **zones** | Specify which zones are to be OCR'd on an image. There can be multiple zones but it works only when the `recognitionMethod` is `Page` . The coordinates are in the sequence of `[[left, top, right, bottom]]` .|
402408
| **settings** | Configure the OCR. |
403-
| **.recognitionModule** | Specify which module is to be used for this OCR. Allowed values are: `mostaccurate`, `fastest`, `balanced` and `auto`. `auto` is the default value which means the library will choose one of the 3 modules automatically. |
404-
| **.languages** |Specify the language for this OCR. For example, English: "eng", Arabic :"arabic". You can also set multiple languages like this "eng,arabic". |
409+
| **.recognitionModule** | Specify which module is to be used for this OCR. Allowed values are: `mostaccurate` , `fastest` , `balanced` and `auto` . `auto` is the default value which means the library will choose one of the 3 modules automatically. |
410+
| **.languages** |Specify the language for this OCR. For example, English: "eng", Arabic :"arabic". You can also set multiple languages like this "eng, arabic". |
405411
| **.recognitionMethod** | Specify how the OCR is done. There are two methods: `Page` is the default value and it means the OCR is performed per page, the other method is `File` which means the OCR is performed per file. The method `File` is faster and it supports multiple threads. But only the method `Page` supports zonal OCR and returning detailed. |
406-
| **.threadCount** | Specify the maximum number of threads to be used OCRing. The default value is -1 which means all possible threads will be used. This setting is only valid when `recognitionMethod` is set to `File`. |
407-
| **.outputFormat** | Specify the output format. Allowed values are `TXTS`, `TXTCSV`, `TXTF`, `XML`, `IOTPDF`, `IOTPDF_MRC` |
408-
| **.pdfVersion** | Specify the version of the PDF file if the `outputFormat` is set to either `IOTPDF` or `IOTPDF_MRC`. The version number allowed ranges from 1.0 to 1.7 and by default it is 1.5. |
409-
| **.pdfAVersion** | Specify the version of the PDF/A file if the `outputFormat` is set to either `IOTPDF` or `IOTPDF_MRC`. The version number allowed are `pdf/a-1a`, `pdf/a-1b`, `pdf/a-2a`, `pdf/a-2b`, `pdf/a-2u`, `pdf/a-3a `, `pdf/a-3b`, `pdf/a-3u`. |
412+
| **.threadCount** | Specify the maximum number of threads to be used OCRing. The default value is -1 which means all possible threads will be used. This setting is only valid when `recognitionMethod` is set to `File` . |
413+
| **.outputFormat** | Specify the output format. Allowed values are `TXTS` , `TXTCSV` , `TXTF` , `XML` , `IOTPDF` , `IOTPDF_MRC` |
414+
| **.pdfVersion** | Specify the version of the PDF file if the `outputFormat` is set to either `IOTPDF` or `IOTPDF_MRC` . The version number allowed ranges from 1.0 to 1.7 and by default it is 1.5. |
415+
| **.pdfAVersion** | Specify the version of the PDF/A file if the `outputFormat` is set to either `IOTPDF` or `IOTPDF_MRC` . The version number allowed are `pdf/a-1a` , `pdf/a-1b` , `pdf/a-2a` , `pdf/a-2b` , `pdf/a-2u` , `pdf/a-3a ` , `pdf/a-3b` , `pdf/a-3u` . |
410416
| **.redaction** | Specify how the redaction is done. |
411417
| **..findText** | A string to specify what to find. |
412418
| **..findTextFlags** | Specify how the text is found. The allowed values are 1 (WHOLEWORD), 2 (MATCHCASE) amd 4 (FUZZYMATCH). |
413419
| **..findTextAction** | Specify how redaction is done. The allowed values are 0 (HIGHLIGHT), 1 (STRIKEOUT) and 2 (MARKFORREDACT). |
414420

421+
### OCRPro. ServerSide. Response
415422

416-
### OCRPro.ServerSide.Response
417-
418-
```javascript
423+
``` javascript
419424
{
420425
"Request": {
421426
inputFile: ["d:\\input\\test.tif"],
422-
settings: {...},
427+
settings: {
428+
...
429+
},
423430
outputFile: ...
424431
}
425432
ocrTotalCount: 300000,
426433
alreadyOCRCount: 80,
427434
code: 0,
428435
message: "Recognize succeeded.",
429-
errorList:
430-
[
431-
{
432-
"input": "d:\\input\\test.tif",
433-
"message": "Image file format error.",
434-
"page": "1"
435-
}
436-
]
437-
resultFile: "***",
438-
resultZoneDetail :
439-
[
440-
["zone1 words", "zone2 words", "zone3 words"], // page 1
441-
["zone1 words", "zone2 words"], // page 2
442-
["zone1 words", "zone2 words"] // page 3
443-
],
444-
resultDetail:
445-
[
446-
[//page 0
447-
{//letter 0
448-
"letter": "Aa",
449-
"boundary": [0,0,18,18]
450-
},
451-
{//letter 1
452-
...
453-
},
436+
errorList: [{
437+
"input": "d:\\input\\test.tif",
438+
"message": "Image file format error.",
439+
"page": "1"
440+
}]
441+
resultFile: "***",
442+
resultZoneDetail: [
443+
["zone1 words", "zone2 words", "zone3 words"], // page 1
444+
["zone1 words", "zone2 words"], // page 2
445+
["zone1 words", "zone2 words"] // page 3
446+
],
447+
resultDetail: [
448+
[ //page 0
449+
{ //letter 0
450+
"letter": "Aa",
451+
"boundary": [0, 0, 18, 18]
452+
},
453+
{ //letter 1
454454
...
455-
],
456-
[//page 1
457-
...
458-
],
459-
...
460-
]
461-
}
455+
},
456+
...
457+
],
458+
[ //page 1
459+
...
460+
],
461+
...
462+
]
463+
}
462464
```
463465

464466
|API |Description |
465467
|:-|:-|
466-
|**inputFile** |Check out [OCRPro.ServerSide.Request](#ocrproserversiderequest) for more info.|
467-
|**settings** |Check out [OCRPro.ServerSide.Request](#ocrproserversiderequest) for more info.|
468-
|**outputFile** |Check out [OCRPro.ServerSide.Request](#ocrproserversiderequest) for more info.|
468+
|**inputFile** |Check out [OCRPro. ServerSide. Request](#ocrproserversiderequest) for more info.|
469+
|**settings** |Check out [OCRPro. ServerSide. Request](#ocrproserversiderequest) for more info.|
470+
|**outputFile** |Check out [OCRPro. ServerSide. Request](#ocrproserversiderequest) for more info.|
469471
|**ocrTotalCount**|Return the number of pages allowed to be OCR'd by the current license.|
470472
|**alreadyOCRCount** |Return the number of pages already OCR'd.|
471-
|**code** |Return the error code for the OCR. If it's not `0`, check `errorList` for more details.|
473+
|**code** |Return the error code for the OCR. If it's not `0` , check `errorList` for more details.|
472474
|**message** |Return the overall error message.|
473475
|**errorList**|Return the detailed error messages for each of the OCR'd files.|
474-
|**resultFile**|Return the result file encoded as a base64 string. It only works when [OCRPro.ServerSide.Request](#ocrproserversiderequest) doesn't specify an output file path.|
475-
|**resultDetail**|Return detailed OCR result down to each found letter in JSON format. This is only valid when the `recognitionMethod` is set to `Page`.|
476+
|**resultFile**|Return the result file encoded as a base64 string. It only works when [OCRPro. ServerSide. Request](#ocrproserversiderequest) doesn't specify an output file path.|
477+
|**resultDetail**|Return detailed OCR result down to each found letter in JSON format. This is only valid when the `recognitionMethod` is set to `Page` .|

info/api/Addon_PDF.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ IsTextBasedPDF(path: string): boolean;
8282
``` typescript
8383
/**
8484
* Set the convert mode.
85-
* @param mode Specify the mode.
85+
* @param mode Specify the mode. The default value is 3 (Dynamsoft.EnumDWT_ConvertMode.CM_AUTO)
8686
*/
8787
SetConvertMode(mode: Dynamsoft.EnumDWT_ConvertMode | number): boolean;
8888
```

info/schedule/beta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ breadcrumbText: Beta
88
description: Dynamic Web TWAIN SDK Documentation Schedule - Beta Release Page
99
---
1010

11-
# Beta Releases
11+
# Beta Releases - test branch
1212

1313
Currently there is no beta release available.

0 commit comments

Comments
 (0)