转换编码字符串值为PDF-417条码在Windows 8应用程序



我试图在Windows 8应用程序中使用ZXing https://zxingnet.codeplex.com/将字符串值转换为PDF-417条形码格式。目前我只能写下面的代码,我怎么能把BitMatrix图像源。

        int width = 115;
        int Height = 65;
        PDF417Writer writer = new PDF417Writer();
        BitMatrix bitIMGNew = writer.encode(value, BarcodeFormat.PDF_417, width, Height);
        WriteableBitmap imgBitmap = bitIMGNew.ToBitmap();

我怎样才能做到这一点?或者我需要使用任何其他dll吗?

用ZXing从一些内容生成PDF417代码。Net中,您应该尝试以下代码片段:

var writer = new BarcodeWriter
{
   Format = BarcodeFormat.PDF_417,
   Options = new EncodingOptions {Width = 115, Height = 65}
};
var imgBitmap = writer.Write(value);

imgBitmap是WriteableBitmap的一个实例,在我看来这是你的图像源。

最新更新