Documentation
Table of contents

Thanks for downloading Dynamsoft Label Recognizer Package!

Your download will start shortly. If your download does not begin, click here to retry.

UI Control

API Name Description
defaultUIElementURL Returns or sets the URL of the .html file that defines the default UI Element.
highlightFillStyle Specifies the color used inside the shape which highlights a found line of text.
highlightStrokeStyle Specifies the color used to paint the outline of the shape which highlights a found line of text.
highlightLineWidth Specifies the line width of the outline of the shape which highlights a found line of text.
regionMaskFillStyle Specifies the color used in the square-loop shape between the actual scanning area and the boundary of the video input.
regionMaskStrokeStyle Specifies the color used to paint the outline of the scanning region.
regionMaskLineWidth Specifies the width of the outline of the scanning region.

defaultUIElementURL

Returns or sets the URL of the .html file that defines the default UI Element. The URL can only be set before the API createInstance is called.

static defaultUIElementURL: string

Code Snippet

// Dynamsoft.DLR.LabelRecognizer.defaultUIElementURL = "https://cdn.jsdelivr.net/npm/dynamsoft-label-recognizer@2.2.1/dist/dlr.ui.html";
let cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance();
await cameraEnhancer.setUIElement(Dynamsoft.DLR.LabelRecognizer.defaultUIElementURL);
recognizer.setImageSource(enhancer);
let recognizer = await Dynamsoft.DLR.LabelRecognizer.createInstance({
    runtimeSettings: "video-passportMRZ"
});
await recognizer.startScanning();

highlightFillStyle

Specifies the color used inside the shape which highlights a found line of text. The default value is rgba(254, 180, 32, 0.3) .

highlightFillStyle: string

highlightStrokeStyle

Specifies the color used to paint the outline of the shape which highlights a found line of text. The default value is rgba(254, 180, 32, 0.9) .

highlightStrokeStyle: string

highlightLineWidth

Specifies the line width of the outline of the shape which highlights a found line of text. The default value is 1 .

highlightLineWidth: number

regionMaskFillStyle

Specifies the color used in the square-loop shape between the actual scanning area and the boundary of the video input. This shape only appears when the text scanning is limited to a specified region. The default value is rgba(0, 0, 0, 0.5) .

regionMaskFillStyle: string

regionMaskStrokeStyle

Specifies the color used to paint the outline of the scanning region. This outline only appears when the text scanning is limited to a specified region. The default value is rgb(254, 142, 20) .

regionMaskStrokeStyle: string

regionMaskLineWidth

Specifies the width of the outline of the scanning region. This outline only appears when the text scanning is limited to a specified region. The default value is 2 .

regionMaskLineWidth: number

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

version 2.2.2

  • Latest version
  • Version 3.x
    • Version 3.0.30(latest)
  • Version 2.x
    • Version 2.2.31
    • Version 2.2.30
    • Version 2.2.11
    • Version 2.2.10
    • Version 2.2.4
    • Version 2.2.2
    • Version 2.2.1
    • Version 2.2.0
Change +
© 2003–2024 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support