Class DataMatrixExtCodetextBuilder

DataMatrixExtCodetextBuilder class

Extended codetext generator for 2D DataMatrix barcodes for ExtendedCodetext Mode of DataMatrixEncodeMode

public class DataMatrixExtCodetextBuilder : ExtCodetextBuilder

Constructors

NameDescription
DataMatrixExtCodetextBuilder()The default constructor.

Methods

NameDescription
AddCodetextWithEncodeMode(DataMatrixEncodeMode, string)Adds codetext with defined encode mode to the extended codetext items
AddECICodetext(ECIEncodings, string)Adds codetext with Extended Channel Identifier
AddECICodetextWithEncodeMode(ECIEncodings, DataMatrixEncodeMode, string)Adds codetext with Extended Channel Identifier with defined encode mode
AddPlainCodetext(string)Adds plain codetext to the extended codetext items
virtual Clear()Clears extended codetext items
override GetExtendedCodetext()Generates Extended codetext from the extended codetext list.

Examples

[C#]
//Extended codetext mode

//create codetext
DataMatrixExtCodetextBuilder textBuilder = new DataMatrixExtCodetextBuilder();
codetextBuilder.AddECICodetextWithEncodeMode(ECIEncodings.Win1251, DataMatrixEncodeMode.Bytes, "World");
codetextBuilder.AddPlainCodetext("Will");
codetextBuilder.AddECICodetext(ECIEncodings.UTF8, "犬Right狗");
codetextBuilder.AddCodetextWithEncodeMode(DataMatrixEncodeMode.C40, "ABCDE");

//generate codetext
string codetext = textBuilder.GetExtendedCodetext();    

//generate
using(BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DataMatrix, codetext))
{
    generator.Parameters.Barcode.DataMatrix.DataMatrixEncodeMode = DataMatrixEncodeMode.ExtendedCodetext;
	generator.Save("test.bmp");
}

See Also