Javascript: Barcode.setBarcodeType Method
Description
Sets the type of barcode that is rendered.
Syntax
<void> Barcode.setBarcodeType(<BarcodeType> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| value | The barcode type. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates Barcode.setBarcodeType in a practical document-editing workflow. It sets the type of barcode that is rendered.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureBarcodeType(barcode, value) {
barcode.setBarcodeType(
value,
function() {
console.log("set barcode type completed.");
},
onTxError
);
}