2D Barcode
哪位大神有自动生成2D条码的实例或者控件,分享一下!谢谢
using Spire.Barcode; namespace ConsoleApplication13 { class Program { static void Main(string[] args) { //创建一个BarcodeSettings对象 BarcodeSettings settings = new BarcodeSettings(); //设置条码类型为二维码 settings.Type = BarCodeType.QRCode; //设置二维码数据和显示文本 settings.Data = "123456789"; settings.Data2D = "123456789"; //设置数据类型为数字 settings.QRCodeDataMode = QRCodeDataMode.Numeric; settings.QRCodeECL = QRCodeECL.H; settings.X = 2.0f; //初始化BarCodeGenerator对象 BarCodeGenerator generator = new BarCodeGenerator(settings); //保存成图片 Image image = generator.GenerateImage(); image.Save("结果.png"); } } }
[此贴子已经被作者于2019-1-9 17:38编辑过]