条形码生成器 - 最佳解决方案


BarCodes generator - the best solution

我需要为自定义折扣卡生成一些条形码((使用 http://www.barcodebakery.com/提供的 php 类)。卡 ID 的示例为:3xxxxxxxxxxY (3 - first digit, x - 10 digits, Y-control digit) 。在我的情况下,最好的条形码一维生成器方法是什么(但是如果这些卡将在不久的将来用于条形码扫描仪)?

我是这项技术的新手,任何帮助/建议都会很棒。

我使用js和css做了一个非常简单的解决方案。这是小提琴:http://jsfiddle.net/u7uPJ/1/

var div = Barcode(document.getElementById('eTeste').className.match(/barcode'-([A-Za-z0-9'-]+)/)[1], "code128",{barWidth:2, barHeight:50});

使用PHP,您只能打印数字代码。js 将读取类名中的数字代码并创建柱线