Java GS1 DataBar Generator to generate, create DataBar barcode in Java Class, JSP, Servlet application using Java Barcode Generator Library
Generate, Create, Print, Draw GS1 DataBar barcode in Java projects
- 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, JPEG, & EPS
- 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:
- GS1 DataBar-14
- GS1 DataBar-14 Truncated
- GS1 DataBar-14 Stacked
- GS1 DataBar-14 Stacked Omnidirectional
- GS1 DataBar Limited (formerly RSS Limited)
- GS1 DataBar Expanded (formerly RSS Expanded)
- GS1 DataBar Expanded Stacked (formerly RSS Expanded Stacked)
Java GS1 DataBar Generator - Property Settings
Java GS1 DataBar Generator in Java Class:
com.onbarcode.barcode.DataBar
Java Barcode Generation FAQ?
- How to generate barcode in Java class?
8 Code39 barcode = new Code39();
9 barcode.setData("0123456789");
10 barcode.drawBarcode("C://barcode.gif");
- 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" />
- 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
- How to draw barcode into image file?
8 Code39 barcode = new Code39();
9 barcode.setData("0123456789");
10 barcode.drawBarcode("C://barcode.gif");
- How to draw barcode in the memory?
Please call one of the following method to draw barcode in the memory
- public boolean drawBarcode(OutputStream outputStream) throws Exception
- public void drawBarcode(Graphics2D g, Rectangle2D rectangle) throws Exception
- How to generate barcode image in Jasper Reports?
Complete Guide for Barcode Generation in Jasper Reports
- How to generate barcode image in iReport?
Complete Guide for Barcode Generation in iReport
- How to generate barcode image in Eclipse BIRT?
Complete Guide for Barcode Generation in Eclipse BIRT
- 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