TX Text Control .NET Server

Javascript: Barcode.setShowText Method

Method|Introduced in 28.0

Description

Sets a value indicating whether the encrypted barcode text value is displayed below or above the barcode image or not.

Syntax

<void> Barcode.setShowText(<boolean> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

The property value.

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.setShowText in a practical document-editing workflow. It sets a value indicating whether the encrypted barcode text value is displayed below or above the barcode image or not.

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

function configureShowText(barcode) {
    barcode.setShowText(
        true,
        function() {
            console.log("set show text completed.");
        },
        onTxError
    );
}