从PictureBox打印条形码 [英] Printing Barcode From PictureBox

查看:85
本文介绍了从PictureBox打印条形码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我需要打印条形码。为了同样我搜索得到一个DLL生成相同。它来自ZenBarcode2200来源。



我成功地在条形码中获取条形码,但我所遇到的问题是条形码下的文本(例如:1000001404)应该以可读的形式存在。它不会来。



另一件事是如何使用条形码打印机从图片框中打印条形码。





以下代码帮助我在图片框中打印条形码数据



Zen.Barcode.Code39BarcodeDraw obj = Zen.Barcode。 BarcodeDrawFactory.Code39WithoutChecksum;



pictureBox1.Image = obj.Draw(1000001404,30);

解决方案

< blockquote>你应该与创建DLL的人交谈 - 他们应该提供技术支持,并且会比我们更了解他们的产品。如果他们不这样做,那么找另一个供应商并要求退款!



但是 - 如果可能的话,我会说你不应该把条形码打印到图片盒中然后从中打印 - 如果可以的话,将条形码直接绘制到您需要打印到的图形上下文中 - 这样就可以以最佳分辨率为打印介质创建条形码。改变分辨率会损坏或破坏条形码的质量和可读性 - 而且它们必须相当精确,以便所有系统都可读,特别是自动高速读取器。


我同意 OriginalGriff 。我快速浏览了你正在使用的条形码项目,我不喜欢它。请尝试使用此代码项目代码条形码图像生成库 [ ^ ]为您提供更好的输出在条形码符号下方显示人类可读文本,您可以将其与PrintDocument类.NET一起使用,将其打印到条形码打印机上(当然,您必须为打印机安装Windows驱动程序)。 / BLOCKQUOTE>

Hello,

I need to print a barcode. For the same I searched got a dll to generate the same. Its from ZenBarcode2200 source.

I am successful in getting barcode in a picture box, but the issue I have is under the barcode the text(for eg: 1000001404) should be there in readable form. Its not coming.

Another thing is how could I print the barcode from picture box using a barcode printer.


The following code helps me to print data as barcode in picturebox

Zen.Barcode.Code39BarcodeDraw obj = Zen.Barcode.BarcodeDrawFactory.Code39WithoutChecksum;

pictureBox1.Image = obj.Draw("1000001404", 30);

解决方案

You should talk to the people who created the DLL - they should provide technical support and will know more about their product than we will. If they don't, then find another supplier and demand your money back!

But - I would say that if possible, you should never print a barcode into a picturebox and then print it from that - if you can, draw the barcode directly onto the graphics context you need it printed onto - that way it gets created at the optimum resolution for the print media. changing resolutions can damage or destroy the quality and thus readability of a barcode - and they do have to be fairly precise to be readable with all systems, particularly automated high speed readers.


I agree with OriginalGriff. I took a quick look at that barcoderender project you are using and I did not like it. Instead of using it, please try this Codeproject code Barcode Image Generation Library[^] that provides you a better output as it displays the "human readable text" below the barcode symbol and you can use it with the PrintDocument class of .NET to get it printed to your barcode printer (you'll have to install a Windows driver for your printer, of course).


这篇关于从PictureBox打印条形码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆