TX Text Control .NET Server

Barcode Object

Object|Introduced in 28.0

Description

The Barcode object provides methods to specify the type and format of barcodes.

Syntax

Barcode

Examples

The following example demonstrates Barcode in a practical document-editing workflow. The Barcode object provides methods to specify the type and format of barcodes.

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

function inspectBarcode(barcode) {
    barcode.getText(
        function(result) {
            console.log("get text result:", result);
        },
        onTxError
    );
}

Members

Methods

MethodDescription
getAdditionalTextGets an additional text that is displayed below or above the barcode image.
getAlignmentGets the alignment of the barcode image inside the control.
getAngleGets the angle of the barcode image inside the control.
getBackColorGets the background color of the barcode control.
getBarcodeTypeGets the type of barcode that is rendered.
getForeColorGets the foreground color of the barcode control.
getShowTextGets a value indicating whether the encrypted barcode text value is displayed below or above the barcode image or not.
getTextGets the text encrypted by the barcode.
getTextAlignmentGets a value indicating whether the barcode text and additional text is displayed below or above the barcode image.
getUpperTextLengthGets the maximum text length.
saveImageSaves the barcode image.
setAdditionalTextSets an additional text that is displayed below or above the barcode image.
setAlignmentSets the alignment of the barcode image inside the control.
setAngleSets the angle of the barcode image inside the control.
setBackColorSets the background color for the barcode control.
setBarcodeTypeSets the type of barcode that is rendered.
setForeColorSets the foreground color for the barcode control.
setShowTextSets a value indicating whether the encrypted barcode text value is displayed below or above the barcode image or not.
setTextSets the text the barcode should encrypt.
setTextAlignmentSets a value indicating whether the barcode text and additional text is displayed below or above the barcode image.
setUpperTextLengthSets the maximum text length.