You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
namespace PeisStart.WInForm.ReportTest
|
|
{
|
|
public class BarCodeHelper
|
|
{
|
|
public static byte[] BuildBarCode(string barCode)
|
|
{
|
|
//ZXing.Common.EncodingOptions options = new ZXing.Common.EncodingOptions()
|
|
//{
|
|
// Height = 100,//设置宽高
|
|
// Width = 200,
|
|
//};
|
|
////生成条形码的图片并保存
|
|
//ZXing.BarcodeWriter wr = new ZXing.BarcodeWriter()
|
|
//{
|
|
// Options = options,//进行指定规格
|
|
// Format = ZXing.BarcodeFormat.CODE_128,//条形码的规格
|
|
//};
|
|
//System.Drawing.Bitmap img = wr.Write(barCode);//生成图片
|
|
|
|
//MemoryStream ms = new MemoryStream();
|
|
//img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
|
|
//byte[] BPicture = new byte[ms.Length];
|
|
//BPicture = ms.GetBuffer();
|
|
//img.Dispose();
|
|
//return BPicture;
|
|
return new byte[1];
|
|
|
|
}
|
|
}
|
|
|
|
}
|