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

Barcode 3of9 

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 3of9.

File Name  :  
com/bethecoder/tutorials/barbecue/BarCode3of9Test.java 
Author  :  Sudhakar KV
Email  :  kvenkatasudhakar@gmail.com
   
package com.bethecoder.tutorials.barbecue;

import java.io.File;

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

public class BarCode3of9Test {

  public static void main (String [] argsthrows Exception {

    //Get Code 3of9 Barcode instance from the Factory
    Barcode barcode = BarcodeFactory.create3of9("123456789"false);

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

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

It gives the following output,

Barcode 3of9


                    Print

   



Books Recommendation

 
 
bl  br