From: Jeremias M. <dev...@gr...> - 2004-10-06 20:42:28
|
Sure. See below. That code snippet should insert a "human-readable" element as described in: http://www.krysalis.org/barcode/barcode-xml.html#Code+39 or http://barcode4j.krysalis.org/barcode-xml.html#Code+39 (depending on what code you use, Barcode4J or the older Krysalis Barcode) BTW, Barcode4J 1.0final (to be expected this month) will have a JavaBean-style API so you won't have to construct an Avalon Configuration tree like this. I hope that helps. On 06.10.2004 04:01:04 Pietter wrote: > Dear All, > > I tried to create barcode Code 39 (bitmap output) without text > (human-readable). > Is there possible to use java codes ? > > /* ConfigType = "Code39" */ > private static BarcodeGenerator getGenerator(String ConfigType) > throws BarcodeException > { > DefaultConfiguration cfg = new DefaultConfiguration("cfg"); > DefaultConfiguration child = new DefaultConfiguration(ConfigType); DefaultConfiguration hr = new DefaultConfiguration("human-readable"); hr.setValue("none"); child.addChild(hr); > cfg.addChild(child); > Logger log = new NullLogger(); > BarcodeUtil util = BarcodeUtil.getInstance(); > BarcodeGenerator gen = util.createBarcodeGenerator(cfg, log); > return gen; > } > > Thank you. Jeremias Maerki |