Re: How to generate barcode Code 39 without human-readable
Jeremias Maerki <[email protected]> Wed, 06 Oct 2004 22:42:17 +0200
| Newsgroups | gmane.comp.krysalis.user |
|---|---|
| Message-ID | <[email protected]> |
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
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl