tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Barcodes > Barbecue > Barcode 2of5

Barcode 2of5 

Barbecue is a free and open source Java library for Barcode generation. This requires the library barbecue-1.5-beta1.jar to be in classpath. The following example shows generating Barcode 2of5.

File Name  :  
Author  :  Sudhakar KV
Email  :  [email protected]
package com.bethecoder.tutorials.barbecue;


import net.sourceforge.barbecue.Barcode;
import net.sourceforge.barbecue.BarcodeFactory;
import net.sourceforge.barbecue.BarcodeImageHandler;

public class BarCodeStd2of5Test {

  public static void main (String [] argsthrows Exception {

    //Get Code 2of5 Barcode instance from the Factory
    Barcode barcode = BarcodeFactory.createStd2of5("123456");

    File imgFile = new File("test2of5.png");

    //Write the bar code to PNG file
    BarcodeImageHandler.savePNG(barcode, imgFile);

It gives the following output,

Barcode 2of5



Books Recommendation

bl  br