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

Public Attributes

const AUTO = "0"
 
const ASCII = "1"
 
const FULL = "6"
 
const CUSTOM = "7"
 
const C40 = "8"
 
const TEXT = "9"
 
const EDIFACT = 10
 
const ANSIX12 = 11
 
const EXTENDED_CODETEXT = 12
 

Detailed Description

DataMatrix encoder's encoding mode, default to AUTO

Member Data Documentation

◆ ANSIX12

const ANSIX12 = 11

Uses ANSI X12 encoding.

◆ ASCII

const ASCII = "1"

Encodes one alphanumeric or two numeric characters per byte

◆ AUTO

const AUTO = "0"

Automatically pick up the best encode mode for datamatrix encoding

◆ C40

const C40 = "8"

Uses C40 encoding. Encodes Upper-case alphanumeric, Lower case and special characters

◆ CUSTOM

const CUSTOM = "7"

Encode with the encoding specified in BarCodeBuilder.CodeTextEncoding

◆ EDIFACT

const EDIFACT = 10

Uses EDIFACT encoding. Uses six bits per character, encodes digits, upper-case letters, and many punctuation marks, but has no support for lower-case letters.

◆ EXTENDED_CODETEXT

const EXTENDED_CODETEXT = 12

ExtendedCodetext mode allows to manually switch encodation schemes in codetext. Allowed encodation schemes are: EDIFACT, ANSIX12, ASCII, C40, Text, Auto. Extended codetext example: "\ansix12:ANSIX12TEXT\ascii:backslash must be \ doubled\edifact:EdifactEncodedText" All backslashes () must be doubled in text.

This sample shows how to do codetext in Extended Mode.

$generator = new BarcodeGenerator(EncodeTypes::DATA_MATRIX); $generator->setCodeText("\\ansix12:ANSIX12TEXT\\ascii:backslash must be \\\\ doubled\\edifact:EdifactEncodedText"); $generator->getParameters()->getBarcode()->getDataMatrix().setDataMatrixEncodeMode(DataMatrixEncodeMode.EXTENDED_CODETEXT); $generator->getParameters()->getBarcode()->getCodeTextParameters().setTwoDDisplayText("My Text"); $generator->save("test.png");

◆ FULL

const FULL = "6"

Encode 8 bit values

◆ TEXT

const TEXT = "9"

Uses TEXT encoding. Encodes Lower-case alphanumeric, Upper case and special characters