Aspose.Barcode for Python via Java Generation and Recognition API docs
Code128EncodeMode Class Reference

Encoding mode for Code128 barcodes. More...

Inherits Enum.

Static Public Attributes

int AUTO = 0
 Encode codetext in classic ISO 15417 mode. More...
 
int CODE_A = 1
 Encode codetext only in 128A codeset. More...
 
int CODE_AB = 3
 Encode codetext only in 128A and 128B codesets. More...
 
int CODE_AC = 5
 Encode codetext only in 128A and 128C codesets. More...
 
int CODE_B = 2
 Encode codetext only in 128B codeset. More...
 
int CODE_BC = 6
 Encode codetext only in 128B and 128C codesets. More...
 
int CODE_C = 4
 Encode codetext only in 128C codeset. More...
 

Detailed Description

Encoding mode for Code128 barcodes.

Code 128

specification. This code demonstrates how to generate code 128 with different encodings

# Generate code 128 with ISO 15417 encoding
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, "ABCD1234567890")
generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Generation.Code128EncodeMode.AUTO)
generator.save(self.image_path_to_save4, Generation.BarCodeImageFormat.PNG)
# Generate code 128 only with Codeset A encoding
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, "ABCD1234567890")
generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Generation.Code128EncodeMode.CODE_A)
generator.save(self.image_path_to_save41, Generation.BarCodeImageFormat.PNG)

Member Data Documentation

◆ AUTO

int AUTO = 0
static

Encode codetext in classic ISO 15417 mode.

The mode should be used in all ordinary cases.

◆ CODE_A

int CODE_A = 1
static

Encode codetext only in 128A codeset.

◆ CODE_AB

int CODE_AB = 3
static

Encode codetext only in 128A and 128B codesets.

◆ CODE_AC

int CODE_AC = 5
static

Encode codetext only in 128A and 128C codesets.

◆ CODE_B

int CODE_B = 2
static

Encode codetext only in 128B codeset.

◆ CODE_BC

int CODE_BC = 6
static

Encode codetext only in 128B and 128C codesets.

◆ CODE_C

int CODE_C = 4
static

Encode codetext only in 128C codeset.