您当前的位置: 首页 » asp.net编程学习 » 用GenCode128.dll生成条码

用GenCode128.dll生成条码

先看看这篇文章:http://www.codeproject.com/KB/GDI-plus/GenCode128.aspx

取得GenCode128.dll,然后引入:

using GenCode128;

主要代码如下:

string num = Request.QueryString["code"];
System.Drawing.Image myimg = Code128Rendering.MakeBarcodeImage(num, 2, true);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
myimg.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
Response.ClearContent();
Response.ContentType = "image/Gif";
Response.BinaryWrite(ms.ToArray());
Response.End();

打印条码:

function printWin(){
    var oWin=window.open("","_blank");
    oWin.document.write(document.getElementById("myDiv").innerHTML);
    oWin.focus();
    oWin.document.close();
    oWin.print();
    oWin.close();
}
留下脚印压缩包密码:sosuo8
名字:
全部评论:
loading...
申明:本站部分文章来自网络,由于各种原因对文章的来源无从考究,如果您是“ 用GenCode128.dll生成条码 ”的原作者,若侵犯您的版权,请与我联系!联系方法:email:ahuinan@21cn.com  QQ:106494262
文章档案
  • 作者:佚名
  • 来源:转载
  • 日期:2011/10/10 22:20:00
  • 点击:loading...
网友投票(您觉得这篇文章怎样?)
loadding...请稍侯......