c#,条码

时间:2022-01-29 01:09:56

static void Generate2(string text)
{
BarcodeWriter writer = new BarcodeWriter();
//使用ITF 格局,,不能被此刻常用的付出宝、微信扫出来
//如果想生成可识另外可以使用 CODE_128 格局
//writer.Format = BarcodeFormat.ITF;
writer.Format = BarcodeFormat.CODE_128;
EncodingOptions options = new EncodingOptions()
{
Width = 150,
Height =50,
Margin=2
};
writer.Options = options;
Bitmap map = writer.Write(text);
string filename = @"H:\桌面\截图\generate2.png";
map.Save(filename, ImageFormat.Png);
}

标签:

原文地点:https://www.cnblogs.com/qqhfeng/p/8984490.html

(0)

(0)

   

举报

评论 一句话评论(0