DS Server

Javascript: TXTextControl.BarcodeAlignment Enumeration

Enumeration|Introduced in 28.0

Description

Determines the alignment of the barcode image inside the control.

Members

MemberDescription
TopLeftSets the alignment of the barcode to the top left of the control.
TopCenterSets the alignment of the barcode to the top center of the control.
TopRightSets the alignment of the barcode to the top right of the control.
MiddleLeftSets the alignment of the barcode to the middle left of the control.
MiddleCenterSets the alignment of the barcode to the middle center of the control.
MiddleRightSets the alignment of the barcode to the middle right of the control.
BottomCenterSets the alignment of the barcode to the bottom center of the control.
BottomLeftSets the alignment of the barcode to the bottom left of the control.
BottomRightSets the alignment of the barcode to the bottom right of the control.

Examples

The following example uses TXTextControl.BarcodeAlignment.TopLeft (sets the alignment of the barcode to the top left of the control.) in a document-editing workflow.

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

function applyBarcodeAlignment(barcode) {
    barcode.setAlignment(
        TXTextControl.BarcodeAlignment.TopLeft,
        function() {
            console.log("set alignment completed.");
        },
        onTxError
    );
}