利用字体生成Code128C 条码_亲测可用!
public static string GetCode128C(string inputData){
string result = "";
int checksum = 105;
int j = 1;
for (int ii = 0; ii < inputData.Length; ii++)
{
if (ii % 2 == 0)
{
checksum += Convert.ToInt32(inputData.Substring(ii, 2)) * j;
if (Convert.ToInt32(inputData.Substring(ii, 2)) < 95)
{
result += Convert.ToChar(Convert.ToInt32(inputData.Substring(ii, 2)) + 32);
}
else
{
result += Convert.ToChar(Convert.ToInt32(inputData.Substring(ii, 2)) + 100);
}
j++;
}
ii++;
}
checksum = checksum % 103;
if (checksum < 95)
{
checksum += 32;
}
else
{
checksum += 100;
}
result = Convert.ToChar(205) + result + Convert.ToChar(checksum) + Convert.ToChar(206);
return result;
} --------------------编程问答-------------------- --------------------编程问答-------------------- E-Label条码标签打印软件,是一款简单易用的条码标签打印软件,所生成的条码均为易做图条码.
软件支持二次开发方便集成.
http://www.ync-tech.com
补充:.NET技术 , C#