Java GS1 DataBar Generator


  • Easy to generate DataBar barcodes in Java Class, J2EE applications
  • Simple to redistribute Java DataBar barcode library. No registration key. No activation code.
  • Generating high quality DataBar Bar Code images in GIF, PNG, JPEG, EPS & BITMAP
  • Generate DataBar barcodes in Jasper Reports, iReport & Eclipse BIRT
  • Completely developed in Java
  • Mature DataBar barcode generation Java library used by 2000+ clients
Index
 

Java Barcode Introduction

Java Barcode is a Java barcode generator which generates high quality 1D (linear) and 2D (matrix) barcodes in Java, Jasper Reports, iReport, and Eclipse BIRT projects.

 

GS1 DataBar Introduction

The GS1 DataBar (formerly RSS) family consists of the following versions:

 

Java GS1 DataBar Generator - Property Settings


Java GS1 DataBar Generator in Java Class: com.onbarcode.barcode.DataBar

 

Java Barcode Generation FAQ?

  1. How to generate barcode in Java class?
    8     Code39 barcode = new Code39(); 
    9           barcode.setData("0123456789"); 
    10          barcode.drawBarcode("C://barcode.gif"); 
    

    Barcode Code 39

  2. How to create barcode image in html or jsp pages?

    • Under demo package, copy barcode folder and its contents to your tomcat.

    • Start tomcat, navigate to http://YourDomain:Port/barcode/barcode?DATA=0123456789&TYPE=CODE39

    • To create bar code images in html or jsp pages, you can insert a image tag (img) into your page.
      For example, <img src="http://YourDomain:Port/barcode/barcode?DATA=0123456789&TYPE=CODE39" />



  3. How to create barcode image in Java Servlet?
    
    1    package com.onbarcode.barcode.test; 
    2     
    3    import com.onbarcode.barcode.AbstractBarcode; 
    4    import com.onbarcode.barcode.Code39; 
    5     
    6    import javax.servlet.http.HttpServlet; 
    7    import javax.servlet.http.HttpServletRequest; 
    8    import javax.servlet.http.HttpServletResponse; 
    9    import javax.servlet.ServletException; 
    10   import javax.servlet.ServletOutputStream; 
    11    
    12   public class TestServlet extends HttpServlet 
    13   { 
    14       public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException 
    15       { 
    16           try { 
    17               Code39 barcode = new Code39(); 
    18               barcode.setData("0123456789"); 
    19                
    20               ServletOutputStream servletoutputstream = response.getOutputStream(); 
    21    
    22               response.setContentType("image/jpeg"); 
    23               response.setHeader("Pragma", "no-cache"); 
    24               response.setHeader("Cache-Control", "no-cache"); 
    25               response.setDateHeader("Expires", 0); 
    26    
    27               barcode.drawBarcode(servletoutputstream); 
    28    
    29           } catch (Exception e) { 
    30               throw new ServletException(e); 
    31           } 
    32       } 
    33   } 
    34   


  4. How to draw barcode into image file?
    8     Code39 barcode = new Code39(); 
    9            barcode.setData("0123456789"); 
    10          barcode.drawBarcode("C://barcode.gif"); 
    


  5. How to draw barcode in the memory?

    Please call one of the following method to draw barcode in the memory

    1. public boolean drawBarcode(OutputStream outputStream) throws Exception
    2. public void drawBarcode(Graphics2D g, Rectangle2D rectangle) throws Exception


  6. How to generate barcode image in Jasper Reports?

    Complete Guide for Barcode Generation in Jasper Reports

  7. How to generate barcode image in iReport?

    Complete Guide for Barcode Generation in iReport

  8. How to generate barcode image in Eclipse BIRT?

    Complete Guide for Barcode Generation in Eclipse BIRT

  9. How to set generated barcode image width and height?

    1) You can set barcode image width and height through properties barcodeWidth and barcodeHeight values.

    or

    2) You can set X (bar module width) and Y (bar module height) values




All Java Barcode Generator Supporting Bar Code Symbology Types



Java Barcode Generator Tutorial