Javascript: Barcode.getAlignment Method
Description
Gets the alignment of the barcode image inside the control.
Syntax
<void> Barcode.getAlignment(<RequestBarcodeAlignmentCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the alignment value. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates Barcode.getAlignment in a practical document-editing workflow. It gets the alignment of the barcode image inside the control.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectAlignment(barcode) {
barcode.getAlignment(
function(alignment) {
if (!alignment) {
console.warn("No barcode alignment was returned.");
return;
}
console.log("get alignment result:", alignment);
},
onTxError
);
}