DS Server

Javascript: Barcode.getAdditionalText Method

Method|Introduced in 28.0

Description

Gets an additional text that is displayed below or above the barcode image.

Syntax

<void> Barcode.getAdditionalText(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the additional text.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates Barcode.getAdditionalText in a practical document-editing workflow. It gets an additional text that is displayed below or above the barcode image.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectAdditionalText(barcode) {
    barcode.getAdditionalText(
        function(result) {
            console.log("get additional text result:", result);
        },
        onTxError
    );
}