DS Server

Javascript: TXTextControl.BarcodeTextAlignment Enumeration

Enumeration|Introduced in 28.0

Description

Determines the alignment of the barcode text and additional text that is displayed inside the control.

Members

MemberDescription
BottomThe text is displayed below the barcode image.
TopThe text is displayed above the barcode image.

Examples

The following example uses TXTextControl.BarcodeTextAlignment.Bottom (the text is displayed below the barcode image.) in a document-editing workflow.

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

function applyBarcodeTextAlignment(barcode) {
    barcode.setTextAlignment(
        TXTextControl.BarcodeTextAlignment.Bottom,
        function() {
            console.log("set text alignment completed.");
        },
        onTxError
    );
}