在C#中(使用Visual 2013)绘制EAN-13条形码最基本的打印方法是什么?
我更愿意包含一个名称空间,为我提供创建和输出条形码的工具。
发布于 2014-09-17 14:22:44
最容易使用IMHO的库是杨木BarCode.NET。您可以找到示例这里
这个图书馆的确花了钱,但工作得很好,对我们来说是值得的。
// Create an instance of BarCodeBuilder
BarCodeBuilder builder = new BarCodeBuilder();
// Set the symbology type
builder.SymbologyType = Symbology.EAN13;
// Set the codetext
builder.CodeText = "test-123";
// Get the barcode image
Image img = builder.BarCodeImage;现在您可以对图像做任何您想做的事情,比如将它保存到文件中,或者写入内存流,等等:
img.Save("path", System.Drawing.Imaging.ImageFormat.Bmp);https://stackoverflow.com/questions/25893116
复制相似问题