当前位置:首页 > Windows程序 > 正文

c#,条码

2024-03-31 Windows程序

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

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/33355.html

Jm-杰米博客Jamie
草根站长的技术交流乐园!IT不会不要紧快来好好学习吧!
  • 20786文章总数
  • 7494585访问次数
  • 建站天数
  • 友情链接