DS Server

Javascript: Barcode.getShowText Method

Method|Introduced in 28.0

Description

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

Syntax

<void> Barcode.getShowText(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the value.

errorCallback

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

Examples

The following example demonstrates Barcode.getShowText in a practical document-editing workflow. It gets 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 inspectShowText(barcode) {
    barcode.getShowText(
        function(result) {
            if (result) {
                console.log("get show text is available.");
            } else {
                console.warn("get show text is not available in the current document state.");
            }
        },
        onTxError
    );
}