如何生成条形码 [英] How do I generate Barcodes

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

问题描述

我想生成要打印图像的条形码,然后将其放在没有条形码的物品上.我如何生成这些图像和代码.一种显示适当的条形而不是数字或字母的字体.因此,您不需要任何特殊的组件,只需要一些能够打印文本然后选择条形码字体而不是通常的可读字体的代码.根据条形码的类型,您只需要对输出字符串进行一些最小的预处理"即可,例如对于代码39,要求您在前面加上星号(例如* 1234 *以获得1234).对于Interleaved 2 of 5,它有点复杂,但也不是很困难: http://en.wikipedia.org/wiki/Interleaved_2_of_5 [^ ]
网络上有一些免费使用的条形码字体,这是Google的搜索字词:
https://www.google.com/search? q = free + barcode + font& ie = utf-8& oe = utf-8 [ https://www.google.com/search?q = codeproject + generate + barcode +& ie = utf-8& oe = utf-8 [ 解决方案

Some barcode types (e.g. Code 39, Code 128, Interleaved 2 of 5) can be "generated" simply by using a font that displays the appropriate bars instead of digits or letters. So you wouldn''t need any special component, just some code that is able to print text and then select the barcode font instead of the usual readable font. Depending on the type of barcode you would only have to do some minimal "preprocessing" of the output string, e.g. for Code 39 it''s required that you prepend and append an asterisk (e.g. *1234* to get 1234). For Interleaved 2 of 5 it''s a bit more sophisticated but also not really difficult: http://en.wikipedia.org/wiki/Interleaved_2_of_5[^]
There are some free to use barcode fonts on the web, here''s a Google search for that:
https://www.google.com/search?q=free+barcode+font&ie=utf-8&oe=utf-8[^]

And then there are a lot of Codeproject-articles that present ways for barcode generation. I didn''t take a look at them because for me the above method works like a treat, but maybe you''ll find one that''s more convenient for you. Here''s a Google search for those articles:
https://www.google.com/search?q=codeproject+generate+barcode+&ie=utf-8&oe=utf-8[^]


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

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