Class DotCodeExtCodetextBuilder

Class DotCodeExtCodetextBuilder

Namespace: Aspose.BarCode.Generation
Assembly: Aspose.BarCode.dll (25.1.0)

用于DotCode编码模式的扩展代码文本生成器,支持2D DotCode条形码的ExtendedCodetext模式

public class DotCodeExtCodetextBuilder : ExtCodetextBuilder

继承

objectExtCodetextBuilderDotCodeExtCodetextBuilder

继承成员

ExtCodetextBuilder.Clear(), ExtCodetextBuilder.AddPlainCodetext(string), ExtCodetextBuilder.AddECICodetext(ECIEncodings, string), ExtCodetextBuilder.GetExtendedCodetext(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

示例

//扩展代码文本模式
//创建代码文本
DotCodeExtCodetextBuilder textBuilder = new DotCodeExtCodetextBuilder();
textBuilder.AddFNC1FormatIdentifier();
textBuilder.AddECICodetext(ECIEncodings.Win1251, "Will");
textBuilder.AddFNC1FormatIdentifier();
textBuilder.AddECICodetext(ECIEncodings.UTF8, "犬Right狗");
textBuilder.AddFNC1FormatIdentifier();
textBuilder.AddECICodetext(ECIEncodings.UTF16BE, "犬Power狗");
textBuilder.AddPlainCodetext("普通文本");
textBuilder.AddFNC3SymbolSeparator();
textBuilder.AddFNC3ReaderInitialization();
textBuilder.AddPlainCodetext("读者初始化信息");

//生成代码文本
string codetext = textBuilder.GetExtendedCodetext();    

//生成
using(BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DotCode, codetext))
{
    generator.Parameters.Barcode.DotCode.DotCodeEncodeMode = DotCodeEncodeMode.ExtendedCodetext;
	generator.Save("test.bmp");
}

构造函数

DotCodeExtCodetextBuilder()

public DotCodeExtCodetextBuilder()

方法

AddFNC1FormatIdentifier()

向扩展代码文本项添加FNC1格式标识符

public void AddFNC1FormatIdentifier()

AddFNC3ReaderInitialization()

向扩展代码文本项添加FNC3读者初始化

public void AddFNC3ReaderInitialization()

AddFNC3SymbolSeparator()

向扩展代码文本项添加FNC3符号分隔符

public void AddFNC3SymbolSeparator()

AddStructuredAppendMode(int, int)

向扩展代码文本项添加结构化附加模式

public void AddStructuredAppendMode(int barcodeId, int barcodesCount)

参数

barcodeId int

条形码ID

barcodesCount int

条形码数量

GetExtendedCodetext()

从扩展代码文本列表生成扩展代码文本。

public override string GetExtendedCodetext()

返回

string

作为字符串的扩展代码文本

 中文