Skip to content

Commit e004356

Browse files
authored
Merge pull request #559 from dynamsoft-docs/preview
Preview
2 parents 0cb3ccc + f6490d3 commit e004356

File tree

6 files changed

+382
-291
lines changed

6 files changed

+382
-291
lines changed

faq/failed-to-load-resource.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,26 @@ In this case, if you are trying to access an application that integrates a versi
3333
Note: the new certificate from Dynamsoft will expire on December 8th, 2023. This means you will need to update the certificate again after this certificate expires.
3434
- Method 3. <a href="{{site.about}}getsupport.html" target="_blank">Contact Dynamsoft</a> for a new MSI for client-side.
3535

36-
37-
3836
- For v17.2 or higher versions, use the new API <a href="{{site.info}}api/Dynamsoft_WebTwainEnv.html#updatecert" target="_blank">UpdateCert</a> to automatically update the client side certificate before it expires.
3937

38+
- If you want to automatically update the certificate, please add following code:
39+
40+
```javascript
41+
// Add the code in dynamsoft.webtwain.configure.js file
42+
Dynamsoft.DWT.ServiceCertUpdateURL= "https://demo.dynamsoft.com/DWT/Resources/dist/cert.zip";
43+
```
44+
```javascript
45+
// Add the code in dynamsoft.webtwain.install.js file
46+
Dynamsoft.DWT.UpdateCert(
47+
Dynamsoft.DWT.ServiceCertUpdateURL,
48+
function () {
49+
},
50+
    function (errorCode, errorString) {
51+
       console.log(errorString);
52+
    }
53+
);
54+
```
55+
4056
<!--
4157

4258
1) Go to service directory, and find _DSConfiguration.ini_.

info/api/Addon_BarcodeReader.md

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ permalink: /info/api/Addon_BarcodeReader.html
2323

2424
## decode
2525

26+
Read an image in the buffer and try to locate and decode barcode(s) on it.
27+
2628
**Syntax**
2729

2830
```typescript
29-
/**
30-
* Read an image in the buffer and try to locate and decode barcode(s) on it.
31-
* @param index Specify the image to decode.
32-
*/
3331
decode(index: number): Promise < ITextResults > ;
3432

3533
interface TextResults {
@@ -128,7 +126,12 @@ interface Result {
128126
}
129127
```
130128

129+
**Parameters**
130+
131+
`index`: Specify the image to decode.
132+
131133
**Availability**
134+
132135
<div class="availability">
133136
<table>
134137

@@ -155,12 +158,11 @@ interface Result {
155158

156159
## getRuntimeSettings
157160

161+
Get the current runtime settings.
162+
158163
**Syntax**
159164

160165
```typescript
161-
/**
162-
* Get the current runtime settings.
163-
*/
164166
getRuntimeSettings(): Promise < RuntimeSettings > ;
165167

166168
interface RuntimeSettings {
@@ -238,37 +240,20 @@ interface Region {
238240

239241
## updateRuntimeSettings
240242

243+
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".
244+
241245
**Syntax**
242246

243247
```typescript
244-
/**
245-
* 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".
246-
* @param settings Specify the runtime settings.
247-
*/
248248
updateRuntimeSettings(settings: RuntimeSettings): Promise < RuntimeSettings > ;
249249
```
250250

251-
**Example**
251+
**Parameters**
252252

253-
```javascript
254-
DWObject.Addon.BarcodeReader.getRuntimeSettings("balance")
255-
.then(function (settings) {
256-
settings.barcodeFormatIds = Dynamsoft.DBR.EnumBarcodeFormat.BF_ONED;
257-
return DWObject.Addon.BarcodeReader.updateRuntimeSettings(settings);
258-
})
259-
.then(function () {
260-
DWObject.Addon.BarcodeReader.decode(0).then(
261-
function (textResult) {
262-
console.log(textResult);
263-
},
264-
function (ex) {
265-
console.log(ex.message || ex);
266-
}
267-
);
268-
});
269-
```
253+
`settings`: Specify the runtime settings.
270254

271255
**Availability**
256+
272257
<div class="availability">
273258
<table>
274259

@@ -291,20 +276,40 @@ DWObject.Addon.BarcodeReader.getRuntimeSettings("balance")
291276
</table>
292277
</div>
293278

279+
**Example**
280+
281+
```javascript
282+
DWObject.Addon.BarcodeReader.getRuntimeSettings("balance")
283+
.then(function (settings) {
284+
settings.barcodeFormatIds = Dynamsoft.DBR.EnumBarcodeFormat.BF_ONED;
285+
return DWObject.Addon.BarcodeReader.updateRuntimeSettings(settings);
286+
})
287+
.then(function () {
288+
DWObject.Addon.BarcodeReader.decode(0).then(
289+
function (textResult) {
290+
console.log(textResult);
291+
},
292+
function (ex) {
293+
console.log(ex.message || ex);
294+
}
295+
);
296+
});
297+
```
298+
294299
---
295300

296301
## resetRuntimeSettings
297302

303+
Reset all runtime settings to default values.
304+
298305
**Syntax**
299306

300307
```typescript
301-
/**
302-
* Reset all runtime settings to default values.
303-
*/
304308
resetRuntimeSettings(): Promise < RuntimeSettings > ;
305309
```
306310

307311
**Availability**
312+
308313
<div class="availability">
309314
<table>
310315

@@ -331,19 +336,22 @@ resetRuntimeSettings(): Promise < RuntimeSettings > ;
331336

332337
## initRuntimeSettingsWithString
333338

339+
Set up the barcode reader with advanced settings.
340+
334341
**Syntax**
335342

336343
```typescript
337-
/**
338-
* Set up the barcode reader with advanced settings.
339-
* @param settings The runtime setting in the form of a string.
340-
*/
341344
initRuntimeSettingsWithString(
342345
settings: string
343346
): Promise < RuntimeSettings > ;
344347
```
345348

349+
**Parameters**
350+
351+
`settings`: The runtime setting in the form of a string.
352+
346353
**Availability**
354+
347355
<div class="availability">
348356
<table>
349357

@@ -364,4 +372,4 @@ initRuntimeSettingsWithString(
364372
</tr>
365373

366374
</table>
367-
</div>
375+
</div>

0 commit comments

Comments
 (0)