建议不要用CODE-39码,改用CODE-128码;

CODE-39码密度比较低,条码数字内容太多,导致条码太长,缩短长度就只能减小X尺寸,造成识读困难;

CODE-128码密度高,相同的数字生成条码更短。

你可以对比一下图中的两个条码,上面是CODE-39,下面是CODE-128,相同的内容:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYUAAAC+CAIAAABVi4TFAAAgAElEQVR4nO2cW5PbOq6Fqbvd7tTM/P//ODvptq27cB7W1hqIkj1S4qrpkyw8pNg0xQsAfgQpKsEkEonka0j4X3dAIpFI/hbxSCKRfBURjyQSyVcR8UgikXwVEY8kEslXEfFIIpF8FRGPJBLJVxHxSCKRfBURjyQSyVcR8UgikXwVEY8kEslXEfFIIpF8FRGPJBLJVxHxSCKRfBURjyQSyVeRn+FR27bTNJnZ7XZDzjiO4zgiYWZ93w/DgJ+6rkP+9Xo1s7quzaxpGpQchqHve1aCBCpnTlTVMAx8/Hq9IvN+v0/TNI4j/kQNSKNFdgM1TNPEan2j6AzSLMNBIZMd5q9RP/u+97Xh17ZtkW6aBoVRHiVZFf5kneshmNnHx4evGb/CFl3XeT2gWq8TapKj6Pvep6EcCJsYx/FR+Udpdoza+/j4oKrZGWijaRp02yvWuwFsgYHgXzbX9z0aGoZhbYvIRmyFTaAS7wxMH9LzI3s9mhdP7BUpPxIOxBt0/eA0TewG+49im3ahq+BZ9IcTnDXTe5HPymmUdYcPyWEe1XXte9a2LbXW9z36x7l3v99tHj9kmib8Sm0iwUy4prkxkw74E801TYMOeLJAKewS6rSlT9isNfIF9URq5SO+zqhjkbuspxNVQZQA5Z7jtsQ6dOWnAauNqjKHY7TYNI33eCif5dF5ms+WPu3TrIRsoq7+67NM07+xDtFA3nG97ciF79+/I+Enki3dACYzsx8/flA53hxMR0av65o5UDvMhG54hzmq50f2ssfz4lE9XqJVM/pzrVXqn1bw3m6P7eI7gKeoZHQ4qoFOC6QyRPhF+Zn4iIsMbRZCYHfTNIUHl2VZliV0FEIIIdR1HUIoiqLrujRNk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1RI0PqsK9Kslk36HCQUMqkbj9GsKQjMY7lUWC/q9546PkwT9ADAB+gHgDOgHgDOgHwDOsKLfGknQDwAToB8AzoB+ADjDhn7H10iCfgCYAP0AcAb0A8AZ0A8AZ0A/AJwB/QBwBvQDwBnQDwBnWNHvXpKgHwAmQD8AnAH9AHAG9APAGRb0Wz1+L0nQDwAToB8AzrCh3wfvJQn6AWAC9APAGdAPAGdAPwCcAf0AcMb/BzN3/t8adebXAAAAAElFTkSuQmCC" alt="" />

Default.aspx

 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="BarcodeTest.Default" %>

 <!DOCTYPE html>

 <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>条形码</title>
<script type="text/javascript" src="jquery-latest.min.js"></script>
<script type="text/javascript">
$(function () {
$("#btnBar").click(function () {
var rawData = $.trim($("#txtRawData").val());
$("#imgBarcode").attr("src", "BarcodeHandler.ashx?RawData=" + rawData + "&BarHeight=50&BarcodeType=" + $("#ddlBarcodeType").val()
+ "&IsDisplayFontData=" + ($("#cbIsDisplayFontData").attr("checked") == "checked") + "&FontSize=" + $("#txtFontSize").val() + "&FontAlignment=" + $("#ddlFontAlignment").get(0).selectedIndex);
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
原始码:
<input type="text" id="txtRawData" maxlength="48" value="BJ-BJSJF-GCSG-0004-HTFY00002" />
<br />
编码选择:<select id="ddlBarcodeType"><option>Auto</option>
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</div>
<br />
字体大小:<input type="text" id="txtFontSize" value="16" />字体布局:<select id="ddlFontAlignment"><option>Near</option>
<option selected="selected">Center</option>
<option>Far</option>
</select><input checked="checked" type="checkbox" id="cbIsDisplayFontData" />字体显示
<div>
<input type="button" id="btnBar" value="生成条形码" />
</div>
<div style="text-align: center;">
<img id="imgBarcode" src="" alt="条形码" />
</div>
</form>
</body>
</html>

BarcodeHandler.ashx

 using Barcode;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web; namespace BarcodeTest
{
/// <summary>
/// author: Kenmu
/// created by: 2014-11-06
/// function: 条形码生成
/// </summary>
public class BarcodeHandler : IHttpHandler
{ public void ProcessRequest(HttpContext context)
{
HttpRequest request = context.Request;
HttpResponse response = context.Response;
response.ClearContent();
response.ContentType = "image/jpeg"; string barcodeType = request["BarcodeType"] ?? "Auto";
string rawData = request["RawData"] ?? ((char)).ToString() + @"123a" + ((char)).ToString() + "ab";
byte barHeight = byte.Parse(string.IsNullOrEmpty(request["BarHeight"]) ? "" : request["BarHeight"]);
bool isDisplayFontData = string.IsNullOrEmpty(request["IsDisplayFontData"]) ? true : bool.Parse(request["IsDisplayFontData"]);
int fontSize = string.IsNullOrEmpty(request["FontSize"]) ? : int.Parse(request["FontSize"]);
int fontAlignment = string.IsNullOrEmpty(request["FontAlignment"]) ? : int.Parse(request["FontAlignment"]);//0(Near左)、1(Center中)、2(Far右)
BaseCode128 code128;
switch (barcodeType)
{
case "A":
code128 = new Code128A(rawData);
break;
case "B":
code128 = new Code128B(rawData);
break;
case "C":
code128 = new Code128C(rawData);
break;
case "Auto":
default:
code128 = new Code128Auto(rawData);
break;
}
code128.BarHeight = barHeight;
code128.IsDisplayFontData = isDisplayFontData;
code128.FontSize = fontSize;
code128.FontAlignment = (System.Drawing.StringAlignment)fontAlignment; System.Drawing.Image img = code128.GetBarCodeImage();
img.Save(response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
img.Dispose();
} public bool IsReusable
{
get
{
return false;
}
}
}
}

CharacterSet.cs

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; //author: Kenmu
//created by: 2014-11-05
//function: 条形码
namespace Barcode
{
/// <summary>
/// Code128字符集
/// </summary>
internal enum CharacterSet
{
A,
B,
C
}
}

IBarCode.cs

 using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text; //author: Kenmu
//created by: 2014-11-05
//function: 条形码
namespace Barcode
{
/// <summary>
/// 条形码接口
/// </summary>
public interface IBarCode
{
string RawData { get; }
/// <summary>
/// 条形码对应的数据
/// </summary>
string EncodedData { get; }
/// <summary>
/// 当前条形码标准
/// </summary>
string BarCodeType { get; } /// <summary>
/// 得到条形码对应的图片
/// </summary>
/// <returns></returns>
Image GetBarCodeImage();
}
}

BaseCode128.cs

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing; //author: Kenmu
//created by: 2014-11-06
//function: 条形码
namespace Barcode
{
/// <summary>
/// BaseCode128抽象类
/// </summary>
public abstract class BaseCode128 : IBarCode
{
protected Color backColor = Color.White;//条码背景色
protected Color barColor = Color.Black;//条码和原始数据字体颜色 /// <summary>
/// 当前条形码种类
/// </summary>
public string BarCodeType
{
get { return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name; }
} /// <summary>
/// 条形码对应的编码数据
/// </summary>
protected string _EncodedData;
public string EncodedData
{
get { return this._EncodedData; }
} /// <summary>
/// 【原始数据】
/// </summary>
protected string _RawData;
public string RawData
{
get { return this._RawData; }
} /// <summary>
/// 在条形码下面显示数据;如果为空,则取【原始数据】
/// </summary>
protected string _PresentationData = null;
public string PresentationData
{
get { return string.IsNullOrEmpty(this._PresentationData) ? this._RawData : this._PresentationData; }
} /// <summary>
/// 条码单位宽度;单位Pix,默认为1
/// </summary>
protected byte _BarCellWidth = ;
public byte BarCellWidth
{
get { return this._BarCellWidth; }
set
{
if (value == )
{
this._BarCellWidth = ;
}
else
{
this._BarCellWidth = value;
}
}
} /// <summary>
/// 条码高度,必须至少是条码宽度的0.15倍或6.35mm,两者取大者;默认按照实际为32,单位mm
/// </summary>
protected byte _BarHeight = ;
public byte BarHeight
{
get { return this._BarHeight; }
set
{
this._BarHeight = value;
}
} /// <summary>
/// 是否在条形码下面显示【原始数据】
/// </summary>
protected bool _IsDisplayFontData = true;
public bool IsDisplayFontData
{
get { return this._IsDisplayFontData; }
set { this._IsDisplayFontData = value; }
} /// <summary>
/// 【原始数据】与条形码的空间间隔;单位Pix,默认为4
/// </summary>
protected byte _FontPadding = ;
public byte FontPadding
{
get { return this._FontPadding; }
set { this._FontPadding = value; }
} /// <summary>
/// 【原始数据】字体大小;单位Pix,默认为16
/// </summary>
protected float _FontSize = ;
public float FontSize
{
get { return this._FontSize; }
set { this._FontSize = value; }
} /// <summary>
/// 【原始数据】字体布局位置;默认水平居中
/// </summary>
protected StringAlignment _FontAlignment = StringAlignment.Center;
public StringAlignment FontAlignment
{
get { return this._FontAlignment; }
set { this._FontAlignment = value; }
} public BaseCode128(string rawData)
{
this._RawData = rawData;
if (string.IsNullOrEmpty(this._RawData))
{
throw new Exception("空字符串无法生成条形码");
}
this._RawData = this._RawData.Trim();
if (!this.RawDataCheck())
{
throw new Exception(rawData + " 不符合 " + this.BarCodeType + " 标准");
}
this._EncodedData = this.GetEncodedData();
} protected int GetBarCodePhyWidth()
{
//在212222这种BS单元下,要计算bsGroup对应模块宽度的倍率
//应该要将总长度减去1(因为Stop对应长度为7),然后结果乘以11再除以6,与左右空白相加后再加上2(Stop比正常的BS多出2个模块组)
int bsNum = (this._EncodedData.Length - ) * / + ;
return bsNum * this._BarCellWidth;
} /// <summary>
/// 数据输入正确性验证
/// </summary>
/// <returns></returns>
protected abstract bool RawDataCheck(); /// <summary>
/// 获取当前Data对应的编码数据(条空组合)
/// </summary>
/// <returns></returns>
protected abstract string GetEncodedData(); /// <summary>
/// 获取完整的条形码
/// </summary>
/// <returns></returns>
public Image GetBarCodeImage()
{
Image barImage = this.GetBarOnlyImage();
int width = barImage.Width;
int height = barImage.Height;
if (this._IsDisplayFontData)
{
height += this._FontPadding + (int)this._FontSize;
} Image image = new Bitmap(width, height);
Graphics g = Graphics.FromImage(image);
g.Clear(this.backColor);
g.DrawImage(barImage, , , barImage.Width, barImage.Height); if (this._IsDisplayFontData)
{
Font drawFont = new Font(new FontFamily("Times New Roman"), this._FontSize, FontStyle.Regular, GraphicsUnit.Pixel);
Brush drawBrush = new SolidBrush(this.barColor);
StringFormat drawFormat = new StringFormat();
drawFormat.Alignment = this._FontAlignment;
RectangleF reF = new RectangleF(, barImage.Height + this._FontPadding, width, this._FontSize);
g.DrawString(this.PresentationData, drawFont, drawBrush, reF, drawFormat); drawFont.Dispose();
drawBrush.Dispose();
drawFormat.Dispose();
} System.IO.MemoryStream ms = new System.IO.MemoryStream();
image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
//结束绘制
g.Dispose();
image.Dispose();
return Image.FromStream(ms);
}
/// <summary>
/// 获取仅包含条形码的图像
/// </summary>
/// <returns></returns>
private Image GetBarOnlyImage()
{
int width = (int)this.GetBarCodePhyWidth();
Bitmap image = new Bitmap(width, this._BarHeight);
int ptr = ;
for (int i = ; i < this._EncodedData.Length; i++)
{
int w = (int)char.GetNumericValue(this._EncodedData[i]);
w *= this._BarCellWidth;
Color c = i % == ? this.barColor : this.backColor;
for (int j = ; j < w; j++)
{
for (int h = ; h < this._BarHeight; h++)
{
image.SetPixel(ptr, h, c);
}
ptr++;
}
}
return image;
}
}
}

Code128.cs

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions; //author: Kenmu
//created by: 2014-11-05
//function: 条形码
namespace Barcode
{
/// <summary>
/// Code128基础相关类
/// </summary>
public static class Code128
{
/*
* 128 尺寸要求
* 最小模块宽度 x 最大1.016mm,最小0.250mm 一个系统中的x应为一恒定值 标准是1mm,放大系数0.25~1.2
* 左右侧空白区最小宽度为 10x
* 条高通常为32mm,实际可以根据具体要求
*
* 最大物理长度不应超过 165mm,可编码的最大数据字符数为48,其中包括应用标识符和作为分隔符使用的FNC1字符,但不包括辅助字符和校验符
*
* AI中FNC1同样作为分隔符使用
*
* ASCII
* 0~31 StartA 专有
* 96~127 StartB 专有
*
* EAN128不使用空格(ASCII码32)
*/ /// <summary>
/// Code128条空排列集合,1代表条b,0代表空s,Index对应符号字符值S
/// </summary>
internal static readonly List<string> BSList = new List<string>()
{
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" , "" , ""
}; internal const byte FNC3_AB = , FNC2_AB = , SHIFT_AB = , CODEC_AB = , CODEB_AC = , CODEA_BC = ;
internal const byte FNC4_A = , FNC4_B = ;
internal const byte FNC1 = , StartA = , StartB = , StartC = ;
internal const byte Stop = ; /// <summary>
/// 获取字符在字符集A中对应的符号字符值S
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
internal static byte GetSIndexFromA(char c)
{
byte sIndex = (byte)c;
//字符集A中 符号字符值S 若ASCII<32,则 S=ASCII+64 ,若95>=ASCII>=32,则S=ASCII-32
if (sIndex < )
{
sIndex += ;
}
else if (sIndex < )
{
sIndex -= ;
}
else
{
throw new NotImplementedException();
}
return sIndex;
}
/// <summary>
/// 获取字符在字符集B中对应的符号字符值S
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
internal static byte GetSIndexFromB(char c)
{
byte sIndex = (byte)c;
if (sIndex > && sIndex < )
{
sIndex -= ;//字符集B中ASCII码 减去32后就等于符号字符值
}
else
{
throw new NotImplementedException();
}
return sIndex;
}
internal static byte GetSIndex(CharacterSet characterSet, char c)
{
switch (characterSet)
{
case CharacterSet.A:
return GetSIndexFromA(c);
case CharacterSet.B:
return GetSIndexFromB(c);
default:
throw new NotImplementedException();
}
}
/// <summary>
/// 判断指定字符是否仅属于指定字符集
/// </summary>
/// <param name="characterSet"></param>
/// <param name="c"></param>
/// <returns></returns>
internal static bool CharOnlyBelongsTo(CharacterSet characterSet, char c)
{
switch (characterSet)
{
case CharacterSet.A:
return (byte)c < ;
case CharacterSet.B:
return (byte)c > && (byte)c < ;
default:
throw new NotImplementedException();
}
}
/// <summary>
/// 判断指定字符是否不属于指定字符集
/// </summary>
/// <param name="characterSet"></param>
/// <param name="c"></param>
/// <returns></returns>
internal static bool CharNotBelongsTo(CharacterSet characterSet, char c)
{
switch (characterSet)
{
case CharacterSet.A:
return (byte)c > ;
case CharacterSet.B:
return (byte)c < && (byte)c > ;
default:
throw new NotImplementedException();
}
}
/// <summary>
/// 当编码转换时,获取相应的切换符对应的符号字符值
/// </summary>
/// <param name="newCharacterSet"></param>
/// <returns></returns>
internal static byte GetCodeXIndex(CharacterSet newCharacterSet)
{
switch (newCharacterSet)
{
case CharacterSet.A:
return CODEA_BC;
case CharacterSet.B:
return CODEB_AC;
default:
return CODEC_AB;
}
}
/// <summary>
/// 获取转换后的字符集
/// </summary>
/// <param name="characterSet"></param>
/// <returns></returns>
internal static CharacterSet GetShiftCharacterSet(CharacterSet characterSet)
{
switch (characterSet)
{
case CharacterSet.A:
return CharacterSet.B;
case CharacterSet.B:
return CharacterSet.A;
default:
throw new NotImplementedException();
}
}
/// <summary>
/// 获取应采用的字符集
/// </summary>
/// <param name="data"></param>
/// <param name="startIndex">判断开始位置</param>
/// <returns></returns>
internal static CharacterSet GetCharacterSet(string data, int startIndex)
{
CharacterSet returnSet = CharacterSet.B;
if (Regex.IsMatch(data.Substring(startIndex), @"^\d{4,}"))
{
returnSet = CharacterSet.C;
}
else
{
byte byteC = GetProprietaryChar(data, startIndex);
returnSet = byteC < ? CharacterSet.A : CharacterSet.B;
}
return returnSet;
}
/// <summary>
/// 从指定位置开始,返回第一个大于95(并且小于128)或小于32的字符对应的值
/// </summary>
/// <param name="data"></param>
/// <param name="startIndex"></param>
/// <returns>如果没有任何字符匹配,则返回255</returns>
internal static byte GetProprietaryChar(string data, int startIndex)
{
byte returnByte = byte.MaxValue;
for (int i = startIndex; i < data.Length; i++)
{
byte byteC = (byte)data[i];
if (byteC < || byteC > && byteC < )
{
returnByte = byteC;
break;
}
}
return returnByte;
}
/// <summary>
/// 获取字符串从指定位置开始连续出现数字的个数
/// </summary>
/// <param name="data"></param>
/// <param name="startIndex"></param>
/// <returns></returns>
internal static int GetDigitLength(string data, int startIndex)
{
int digitLength = data.Length - startIndex;//默认设定从起始位置开始至最后都是数字
for (int i = startIndex; i < data.Length; i++)
{
if (!char.IsDigit(data[i]))
{
digitLength = i - startIndex;
break;
}
}
return digitLength;
}
}
}

Code128A.cs

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; //author: Kenmu
//created by: 2014-11-05
//function: 条形码
namespace Barcode
{
/// <summary>
/// Code128A条形码,只支持128字符集A(数字、大写字母、控制字符)
/// </summary>
public class Code128A : BaseCode128
{
public Code128A(string rawData)
: base(rawData)
{
} protected override bool RawDataCheck()
{
//128字符集A对应的ASCII码范围为0~95
foreach (char c in this._RawData)
{
byte tempC = (byte)c;
if (tempC <= )
{
continue;
}
else
{
return false;
}
}
return true;
} protected override string GetEncodedData()
{
StringBuilder tempBuilder = new StringBuilder();
tempBuilder.Append(Code128.BSList[Code128.StartA]);//加上起始符StartA
byte sIndex;
int checkNum = Code128.StartA;//校验字符
for (int i = ; i < this._RawData.Length; i++)
{
sIndex = Code128.GetSIndexFromA(this._RawData[i]);
tempBuilder.Append(Code128.BSList[sIndex]);
checkNum += (i + ) * sIndex;
}
checkNum %= ;
tempBuilder.Append(Code128.BSList[checkNum]);//加上校验符
tempBuilder.Append(Code128.BSList[Code128.Stop]);//加上结束符
return tempBuilder.ToString();
}
}
}

Code128Auto.cs

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; //author: Kenmu
//created by: 2014-11-05
//function: 条形码
namespace Barcode
{
/// <summary>
/// Code128Auto条形码,遵循长度最小原则
/// </summary>
public class Code128Auto : BaseCode128
{
public Code128Auto(string rawData)
: base(rawData)
{
} protected override bool RawDataCheck()
{
//Code128对应的ASCII码范围是0~127
foreach (char c in this._RawData)
{
if ((byte)c > )
{
return false;
}
}
return true;
} protected override string GetEncodedData()
{
StringBuilder tempBuilder = new StringBuilder(); CharacterSet nowCharacterSet = Code128.GetCharacterSet(this._RawData, ); int checkNum;//校验字符
switch (nowCharacterSet)
{
case CharacterSet.A:
tempBuilder.Append(Code128.BSList[Code128.StartA]);//加上起始符StartA
checkNum = Code128.StartA;
break;
case CharacterSet.B:
tempBuilder.Append(Code128.BSList[Code128.StartB]);//加上起始符StartB
checkNum = Code128.StartB;
break;
default:
tempBuilder.Append(Code128.BSList[Code128.StartC]);//加上起始符StartC
checkNum = Code128.StartC;
break;
}
int nowWeight = , nowIndex = ;
this.GetEncodedData(tempBuilder, nowCharacterSet, ref nowIndex, ref nowWeight, ref checkNum); checkNum %= ;
tempBuilder.Append(Code128.BSList[checkNum]);//加上校验符
tempBuilder.Append(Code128.BSList[Code128.Stop]);//加上结束符
return tempBuilder.ToString();
}
/// <summary>
/// 通用方法
/// </summary>
/// <param name="tempBuilder"></param>
/// <param name="sIndex"></param>
/// <param name="nowWeight"></param>
/// <param name="checkNum"></param>
private void EncodingCommon(StringBuilder tempBuilder, byte sIndex, ref int nowWeight, ref int checkNum)
{
tempBuilder.Append(Code128.BSList[sIndex]);
checkNum += nowWeight * sIndex;
nowWeight++;
}
/// <summary>
/// 获取编码后的数据
/// </summary>
/// <param name="tempBuilder">编码数据容器</param>
/// <param name="nowCharacterSet">当前字符集</param>
/// <param name="i">字符串索引</param>
/// <param name="nowWeight">当前权值</param>
/// <param name="checkNum">当前检验值总和</param>
private void GetEncodedData(StringBuilder tempBuilder, CharacterSet nowCharacterSet, ref int i, ref int nowWeight, ref int checkNum)
{//因为可能存在字符集C,所以i与nowWeight可能存在不一致关系,所以要分别定义
byte sIndex;
switch (nowCharacterSet)
{
case CharacterSet.A:
case CharacterSet.B:
for (; i < this._RawData.Length; i++)
{
if (char.IsDigit(this._RawData[i]))
{
//数字
int digitLength = Code128.GetDigitLength(this._RawData, i);
if (digitLength >= )
{
//转入CodeC
if (digitLength % != )
{//奇数位数字,在第一个数字之后插入CodeC字符
sIndex = Code128.GetSIndex(nowCharacterSet, (this._RawData[i]));
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum);
i++;
}
nowCharacterSet = CharacterSet.C;
sIndex = Code128.GetCodeXIndex(nowCharacterSet);//插入CodeC切换字符
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum);
this.GetEncodedData(tempBuilder, nowCharacterSet, ref i, ref nowWeight, ref checkNum);
return;
}
else
{
//如果小于4位数字,则直接内部循环结束
for (int j = ; j < digitLength; j++)
{
sIndex = Code128.GetSIndex(nowCharacterSet, (this._RawData[i]));
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum);
i++;
}
i--;//因为上面循环结束后继续外部循环会导致i多加了1,所以要减去1
continue;
}
}
else if (Code128.CharNotBelongsTo(nowCharacterSet, this._RawData[i]))
{//当前字符不属于目前的字符集
byte tempByte = Code128.GetProprietaryChar(this._RawData, i + );//获取当前字符后第一个属于A,或B的字符集
CharacterSet tempCharacterSet = Code128.GetShiftCharacterSet(nowCharacterSet);
if (tempByte != byte.MaxValue && Code128.CharOnlyBelongsTo(nowCharacterSet, (char)tempByte))
{
//加入转换符
sIndex = Code128.SHIFT_AB;
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum); sIndex = Code128.GetSIndex(tempCharacterSet, this._RawData[i]);
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum);
continue;
}
else
{
//加入切换符
nowCharacterSet = tempCharacterSet;
sIndex = Code128.GetCodeXIndex(nowCharacterSet);
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum);
this.GetEncodedData(tempBuilder, nowCharacterSet, ref i, ref nowWeight, ref checkNum);
return;
}
}
else
{
sIndex = Code128.GetSIndex(nowCharacterSet, this._RawData[i]);
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum);
}
}
break;
default:
for (; i < this._RawData.Length; i += )
{
if (i != this._RawData.Length - && char.IsDigit(this._RawData, i) && char.IsDigit(this._RawData, i + ))
{
sIndex = byte.Parse(this._RawData.Substring(i, ));
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum);
}
else
{
nowCharacterSet = Code128.GetCharacterSet(this._RawData, i);
//插入转换字符
sIndex = Code128.GetCodeXIndex(nowCharacterSet);
this.EncodingCommon(tempBuilder, sIndex, ref nowWeight, ref checkNum);
this.GetEncodedData(tempBuilder, nowCharacterSet, ref i, ref nowWeight, ref checkNum);
return;
}
}
break;
}
}
}
}

Code128B.cs

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; //author: Kenmu
//created by: 2014-11-05
//function: 条形码
namespace Barcode
{
/// <summary>
/// Code128B条形码,只支持128字符集B(数字、大小字母、字符)
/// </summary>
public class Code128B : BaseCode128
{
public Code128B(string rawData)
: base(rawData)
{
} protected override bool RawDataCheck()
{
//128字符集B对应的ASCII码范围为32~127
foreach (char c in this._RawData)
{
byte tempC = (byte)c;
if (tempC >= && tempC <= )
{
continue;
}
else
{
return false;
}
}
return true;
} protected override string GetEncodedData()
{
StringBuilder tempBuilder = new StringBuilder();
tempBuilder.Append(Code128.BSList[Code128.StartB]);//加上起始符StartB
byte sIndex;
int checkNum = Code128.StartB;//校验字符
for (int i = ; i < this._RawData.Length; i++)
{
sIndex = Code128.GetSIndexFromB(this._RawData[i]);//字符集B中ASCII码 减去32后就等于符号字符值
tempBuilder.Append(Code128.BSList[sIndex]);
checkNum += (i + ) * sIndex;
}
checkNum %= ;
tempBuilder.Append(Code128.BSList[checkNum]);//加上校验符
tempBuilder.Append(Code128.BSList[Code128.Stop]);//加上结束符
return tempBuilder.ToString();
}
}
}

Code128C.cs

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions; //author: Kenmu
//created by: 2014-11-05
//function: 条形码
namespace Barcode
{
/// <summary>
/// Code128C条形码,只支持128字符集C(双位数字)
/// </summary>
public class Code128C : BaseCode128
{
public Code128C(string rawData)
: base(rawData)
{
} protected override bool RawDataCheck()
{
return Regex.IsMatch(this._RawData, @"^\d{2,96}$") && this._RawData.Length % == ;//Code128C 2个数字代表一个数据字符,所以最大可以96个数字
} protected override string GetEncodedData()
{
StringBuilder tempBuilder = new StringBuilder();
tempBuilder.Append(Code128.BSList[Code128.StartC]);//加上起始符StartC
byte sIndex;
int checkNum = Code128.StartC;//校验字符,StartC为105
for (int i = ; i < this._RawData.Length / ; i++)
{
sIndex = byte.Parse(this._RawData.Substring(i * , ));
tempBuilder.Append(Code128.BSList[sIndex]);
checkNum += (i + ) * sIndex;
}
checkNum %= ;
tempBuilder.Append(Code128.BSList[checkNum]);//加上校验符
tempBuilder.Append(Code128.BSList[Code128.Stop]);//加上结束符
return tempBuilder.ToString();
}
}
}

如有需要,请点击下面链接进行下载:

基于128位的条形码Barcode.zip

.NET条形码的更多相关文章

  1. C# 条形码操作【源码下载】

    本篇介绍通过C#生成和读取一维码.二维码的操作. 目录 1. 介绍:介绍条形码.条形码的分类以及ZXing.Net类库. 2. 一维码操作:包含对一维码的生成.读取操作. 3. 二维码操作:包含对二维 ...

  2. Android 扫描条形码(Zxing插件)

    使用Android Studio 一.在build.gradle(Module:app)添加代码  下载,调用插件 1 apply plugin: 'com.android.application' ...

  3. 在DevExpress程序中使用条形码二维码控件,以及进行报表打印处理

    在很多业务系统里面,越来越多涉及到条形码.二维码的应用了,不管在Web界面还是WInform界面都需要处理很多物料相关的操作,甚至很多企业为了减少录入错误操作,为每个设备进行条形码.二维码的标签,直接 ...

  4. Java 条形码 二维码 的生成与解析

    Barcode简介 Barcode是由一组按一定编码规则排列的条,空符号,用以表示一定的字符,数字及符号组成的,一种机器可读的数据表示方式. Barcode的形式多种多样,按照它们的外观分类: Lin ...

  5. C#通过第三方组件生成二维码(QR Code)和条形码(Bar Code)

    用C#如何生成二维码,我们可以通过现有的第三方dll直接来实现,下面列出几种不同的生成方法: 1):通过QrCodeNet(Gma.QrCodeNet.Encoding.dll)来实现 1.1):首先 ...

  6. C# 在Word文档中生成条形码

    C# 在Word文档中生成条形码 简介 条形码是由多个不同的空白和黑条按照一定的顺序组成,用于表示各种信息如产品名称.制造商.类别.价格等.目前,条形码在我们的日常生活中有着很广泛的应用,不管是在图书 ...

  7. 条形码的应用三-----------从Excel文件中读取条形码

    条形码的应用三------从Excel文件中读取条形码 介绍 上一篇文章,我向大家展示了生成多个条形码并存储到Excel文件中的一个方法.后来我又有了个想法:既然条码插入到excel中了,我可不可以从 ...

  8. JQUERY PLUGIN:BARCODE条形码插件

    1)query.barcode.js安装 同其他jquery插件一样,只需要将jquery框架和jquery.barcode.js导入页面即可. <script type="text/ ...

  9. 使用html2canvas实现批量生成条形码

    /*前台代码*/ <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Generat ...

  10. 使用WPF动态生成Code 39条形码

    最近在看些条形码方面相关的资料,而如果只是看的话,效果似乎并不怎么好,所以决定动手做点Demo,以增强对相关知识的记忆. 这里是一个我编写的使用WPF生成Code 39的例子,Code 39的编码很简 ...

随机推荐

  1. Sublime Text 3安装与使用,安装插件,快捷键,默认配置

    本文是Sublime Text 全程指引 by Lucida (http://www.cnblogs.com/figure9/p/sublime-text-complete-guide.html)的笔 ...

  2. 【转】 oracle 层次查询判断叶子和根节点

    Oracle 9i判断是叶子或根节点,是比较麻烦的一件事情,SQL演示脚本如下: DROP TABLE idb_hierarchical; create TABLE idb_hierarchical ...

  3. Sql server在另一台服务器,在Visual Studio 中没问题,IIS中 提示“在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。。。。”

    可能问题一: 确切的说是在IIS 7.5中有这问题 就是在visual studio中都用的好好的,但是加载到IIS上的时候竟然报错“ 在与 SQL Server 建立连接时出现与网络相关的或特定于实 ...

  4. [note]What I’ve learnt from working on startups

    What I've learnt from working on startups 从失败里学到了什么,六次创业失败. 企业家不是与生俱来的,也是靠学来的. 想的太多,做的太少.

  5. java 获取参数泛型类型

    import java.lang.reflect.ParameterizedType; public abstract class SampleObjectCallBack<T> { pr ...

  6. python多线程生产消费

    #!/usr/bin/env python# -*- coding: utf-8 -*- from threading import Threadfrom Queue import Queueimpo ...

  7. SpringCloud 天气预报系统 Quartz集成

    https://blog.csdn.net/csdn_wangchen/article/details/79402097 继上一次的redis集成后,有了很大的改观,但是缺少数据的同步.------& ...

  8. tf变换(1)

    TF库的目的是实现系统中任一个点在所有坐标系之间的坐标变换,也就是说,只要给定一个坐标系下的一个点的坐标,就能获得这个点在其他坐标系的坐标. 使用tf功能包,a. 监听tf变换: 接收并缓存系统中发布 ...

  9. sublime 之 vitage/emmet

    ctrl+shift+p 打开Package Controlctrl+shift+t 恢复已关闭标签ctrl+/ 代码注释/取消注释 --------------------------------- ...

  10. tensorflow里面共享变量、name_scope, variable_scope等如何理解

    tensorflow里面共享变量.name_scope, variable_scope等如何理解 name_scope, variable_scope目的:1 减少训练参数的个数. 2 区别同名变量 ...