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

Public Attributes

const AUTO = 0
 
const CODE_A = 1
 
const CODE_B = 2
 
const CODE_C = 4
 
const CODE_AB = 3
 
const CODE_AC = 5
 
const CODE_BC = 6
 

Detailed Description

Encoding mode for Code128 barcodes.

Code 128

specification.


Thos code demonstrates how to generate code 128 with different encodings

//Generate code 128 with ISO 15417 encoding
$generator = new BarcodeGenerator(EncodeTypes::Code128, "ABCD1234567890");
$generator->Parameters->Barcode->Code128->setCode128EncodeMode(Code128EncodeMode::AUTO);
$generator->Save("d:/code128Auto.png", BarCodeImageFormat::Png);
//Generate code 128 only with Codeset A encoding
$generator = new BarcodeGenerator(EncodeTypes::Code128, "ABCD1234567890");
$generator->Parameters->Barcode->Code128->setCode128EncodeMode(Code128EncodeMode::CODE_A);
$generator->Save("d:/code128CodeA.png", BarCodeImageFormat::Png);

Member Data Documentation

◆ AUTO

const Code128EncodeMode::AUTO = 0

Encode codetext in classic ISO 15417 mode. The mode should be used in all ordinary cases.

◆ CODE_A

const Code128EncodeMode::CODE_A = 1

Encode codetext only in 128A codeset.

◆ CODE_AB

const Code128EncodeMode::CODE_AB = 3

Encode codetext only in 128A and 128B codesets.

◆ CODE_AC

const Code128EncodeMode::CODE_AC = 5

Encode codetext only in 128A and 128C codesets.

◆ CODE_B

const Code128EncodeMode::CODE_B = 2

Encode codetext only in 128B codeset.

◆ CODE_BC

const Code128EncodeMode::CODE_BC = 6

Encode codetext only in 128B and 128C codesets.

◆ CODE_C

const Code128EncodeMode::CODE_C = 4

Encode codetext only in 128C codeset.