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

Public Attributes

const AUTO = 0
const ASCII = 1
const BYTES = 6
const C40 = 8
const TEXT = 9
const EDIFACT = 10
const ANSIX12 = 11

Detailed Description

DataMatrix encoder's encoding mode, default to AUTO

Member Data Documentation


const DataMatrixEncodeMode::ANSIX12 = 11

Uses ANSI X12 encoding.


const DataMatrixEncodeMode::ASCII = 1

Encodes one alphanumeric or two numeric characters per byte


const DataMatrixEncodeMode::AUTO = 0

Automatically pick up the best encode mode for datamatrix encoding


const DataMatrixEncodeMode::BYTES = 6

Encode 8 bit values

◆ C40

const DataMatrixEncodeMode::C40 = 8

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


const DataMatrixEncodeMode::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.


const DataMatrixEncodeMode::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->setCodeText("\\ansix12:ANSIX12TEXT\\ascii:backslash must be \\\\ doubled\\edifact:EdifactEncodedText");
$generator->getParameters()->getBarcode()->getCodeTextParameters()->setTwoDDisplayText("My Text");
$generator->save("test.png", BarcodeImageFormat::PNG);


const DataMatrixEncodeMode::TEXT = 9

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