繁体   English   中英

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

[英]Convert Encode string value to PDF-417 barcode in Windows 8 application?

我正在尝试在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.Net从某些内容生成PDF417代码,您应该尝试以下代码段:

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

imgBitmap是WriteableBitmap的实例,我认为它是您的图像源。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM