CustomerInformationInterpretingType

CustomerInformationInterpretingType enumeration

Defines the interpreting type(C_TABLE or N_TABLE) of customer information for AustralianPost BarCode.

public enum CustomerInformationInterpretingType

Values

NameValueDescription
C_TABLE0Use C_TABLE to interpret the customer information. Allows A..Z, a..z, 1..9, space and # sing. let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, “5912345678ABCde”); generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE); let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG); let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST); reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE); let results = reader.readBarCodes(); for(let i = 0; i < results.length; i++) { let result = results[i]; console.log(“BarCode Type: " + result.getCodeType()); console.log(“BarCode CodeText: " + result.getCodeText()); }
N_TABLE1Use N_TABLE to interpret the customer information. Allows digits. let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, “59123456781234567”); generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.N_TABLE); let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG); let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST); reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE); let results = reader.readBarCodes(); for(let i = 0; i < results.length; i++) { let result = results[i]; console.log(“BarCode Type: " + result.getCodeType()); console.log(“BarCode CodeText: " + result.getCodeText()); }
OTHER2Do not interpret the customer information. Allows 0, 1, 2 or 3 symbol only. let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, “59123456780123012301230123”); generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.OTHER); let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG); let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST); reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.OTHER)); let results = reader.readBarCodes(); for(let i = 0; i < results.length; i++) { let result = results[i]; console.log(“BarCode Type: " + result.getCodeType()); console.log(“BarCode CodeText: " + result.getCodeText()); }

Examples

let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678ABCde");
generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
image = generator.generateBarCodeImage();
let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
let results = reader.readBarCodes();
for(let i = 0; i < results.length; i++)
{
let result = results[i];
console.log("BarCode Type: " + result.getCodeType());
console.log("BarCode CodeText: " + result.getCodeText());
}

generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, “59123456781234567”);

generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.N_TABLE);
image = generator.generateBarCodeImage();
reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
let results = reader.readBarCodes();
for(let i = 0; i < results.length; i++)
{
let result = results[i];
console.log("BarCode Type: " + result.getCodeType());
console.log("BarCode CodeText: " + result.getCodeText());
}
let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456780123012301230123");
generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.OTHER);
image = generator.generateBarCodeImage();
let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
reader.CustomerInformationInterpretingType = CustomerInformationInterpretingType.OTHER);
let results = reader.readBarCodes();
for(let i = 0; i < results.length; i++)
{
let result = results[i];
console.log("BarCode Type: " + result.getCodeType());
console.log("BarCode CodeText: " + result.getCodeText());
}

See Also