Inherits Enum.
DataMatrix encoder's encoding mode, default to AUTO.
int EXTENDED_CODETEXT = 12 |
|
static |
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 = 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", BarCodeImageFormat.PNG)