日期:2014-05-17  浏览次数:20816 次

WPF 打印 一维码(条形码)图片。
有没有可以参考的源代码?
我需要的是可以打印的一维码图片。。
不是字符串。也不是其他格式的。
我知道可以转换。但是请给出转换成图片的方法。

------解决方案--------------------
刚做过..我做的是打印..一个原理..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Me.BarcodeSoftware.Barcode
{
    public class Code39
    {
        //w - wide
        //t - thin
        //Start the drawing with black, white, black, white......
        public string encode(string data, int chk)
        {
            string fontOutput = mcode(data, chk);
            string output = "";
            string pattern = "";
            for (int x = 0; x < fontOutput.Length; x++)
            {
                switch (fontOutput[x])
                {
                    case '1':
                        pattern = "wttwttttwt";
                        break;
                    case '2':
                        pattern = "ttwwttttwt";
                        break;
                    case '3':
                        pattern = "wtwwtttttt";
                        break;
                    case '4':
                        pattern = "tttwwtttwt";
                        break;
                    case&