DS Server

Javascript: Barcode.setAdditionalText Method

Method|Introduced in 28.0

Description

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

Syntax

<void> Barcode.setAdditionalText(<string> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

The additional text.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates Barcode.setAdditionalText in a practical document-editing workflow. It sets 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 configureAdditionalText(barcode) {
    barcode.setAdditionalText(
        "Invoice line items",
        function() {
            console.log("set additional text completed.");
        },
        onTxError
    );
}