Resource Base
Table of contents

Settings

API Index

Scan Settings

API Name Description
getScanSettings() Returns the current ScanSettings.
updateScanSettings() Updates scan settings with the object passed in.

Runtime Settings

API Name Description
getRuntimeSettings() Gets runtime settings with a template represented by a JSON object.
setRuntimeSettings() Sets runtime settings with a JSON object or a built-in template or a template string.
resetRuntimeSettings() Resets all runtime setting parameters to default values.

getScanSettings

Returns the current scan settings.

getScanSettings(): Promise<ScanSettings>

Return value

A promise resolving to a ScanSettings .

Code Snippet

let scanSettings = await normalizer.getScanSettings();
scanSettings.intervalTime = 50;
await normalizer.updateScanSettings(scanSettings);

updateScanSettings

Updates scan settings with the object passed in.

updateScanSettings(settings: ScanSettings): Promise<void>

Parameters

settings : specifies the new scan settings using ScanSettings.

Return value

A promise that resolves when the operation succeeds.

Code Snippet

let scanSettings = await normalizer.getScanSettings();
scanSettings.intervalTime = 50;
await normalizer.updateScanSettings(scanSettings);

getRuntimeSettings

Gets current runtime settings with a template represented by a JSON object.

getRuntimeSettings(): Promise<object>

Return value

A promise resolving to a JSON object that contains the settings for label recognizing.

Code snippet

let settings = await normalizer.getRuntimeSettings();

setRuntimeSettings

Sets runtime settings with a JSON object or a built-in template or a template string.

setRuntimeSettings(settings: object | string): Promise<void>

Parameters

settings : a JSON object that contains the new runtime settings or a string which refers to a built-in template or a template string. As of version 1.0.10, the only built-in template is “lowcontrast”, which, as the name suggests, is optimized for detecting document boundaries with colors similar to the surrounding environment.

Return value

A promise that resolves when the operation succeeds.

Code snippet

let settings = await normalizer.getRuntimeSettings();
settings.ImageParameterArray[0].BinarizationModes[0].ThresholdCompensation = 3;
settings.ImageParameterArray[0].ScaleDownThreshold = 512;
await normalizer.setRuntimeSettings(settings);

//or use a built-in template "lowcontrast"
await normalizer.setRuntimeSettings("lowcontrast");

resetRuntimeSettings

Resets all runtime setting parameters to default values.

resetRuntimeSettings(): Promise<void>

Return value

A promise that resolves when the operation succeeds.

Code snippet

await normalizer.resetRuntimeSettings();

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(2.2.10)
    • Version 2.x
      • Version 2.0.21
      • Version 2.0.20
      • Version 2.0.11
    • Version 1.x
      • Version 1.0.12
      • Version 1.0.11
      • Version 1.0.10
      • Version 1.0.0
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support