Java Codabar Generator Library SDK Integration & Developer Guide

Generate barcode codabar images in Java class, Servlet, JSP, J2EE with complete sample Java source code


  • Generate, create Codabar in Java applications
  • Easy to install & integrate barcode Codabar generation library SDK into Java developments
  • Generate over 30 linear, 2d barcode images in Java including Java QR Code, Java Data Matrix, Java PDF-417, Java Code 39, Java Code 128, Java EAN
  • Generate Codabar images in Java class, Java Bean, Swing, Applet, J2SE
  • Create barcode Codabar in Java web application, including Servlet, JSP, EJB, Tomcat, JBoss, J2EE
  • Create & Print Codabar barcode in BIRT reports designer and BIRT report runtime
  • Generate & Draw Codabar in Jasper Reports, iReport
  • Encode Codabar images to jpeg, eps, gif, png, tiff, bitmap files in Java program


Index
 

Java Codabar Generator Introduction

Codabar, known as Codeabar, Ames Code, Monarch, Code 2 of 7, Rationalized Codabar, ANSI/AIM BC3-1995 or USD-4, is a discrete, self-checking linear barcode symbology.

Generate and create Codabar barcode using Java is one of the functions in OnBarcode's Barcode for Java Generating Java library (jar file), which supports generating & printing Codabar and 20+ other linear & 2D bar codes in Java application and software.

Codabar Generator and Reader library, SDK & application
Codabar Generator components and software include .NET Codabar, C# Codabar, ASP.NET Codabar, VB.NET Codabar, Codabar Generator.

This document is providing a detailed Java sample source code about generating Codabar barcodes in Java class using Java Barcode generation component. Complete Codabar custmoization settings is included in Java Codabar generating guide.

 

Generate Codabar Barcodes in Java

Generating Codabar barcode in Java class example:

	Codabar barcode = new Codabar();
	
	// Codabar data to encode
	/*
	           Codabar Valid data char set:
	                - (Dash), $ (Dollar), : (Colon), / (Slash), . (Point), + (Plus)
	                0, 1, 2, 3, 4, 5, 6, 7, 8, 9
	        */
	barcode.setData("112233445566");
	
	// Codabar Start & Stop Char, Valid values are 'A', 'B', 'C', 'D'
	barcode.setStartChar('A');
	barcode.setStopChar('A');
	
	// Codabar Unit of Measure, pixel, cm, or inch
	barcode.setUom(IBarcode.UOM_PIXEL);
	// Codabar bar module width (X) in pixel
	barcode.setX(3f);
	// Codabar bar module height (Y) in pixel
	barcode.setY(75f);
	
	// Codabar image margins
	barcode.setLeftMargin(0f);
	barcode.setRightMargin(0f);
	barcode.setTopMargin(0f);
	barcode.setBottomMargin(0f);
	
	// Codabar image resolution in dpi
	barcode.setResolution(72);
	
	// disply barcode encoding data below the barcode
	barcode.setShowText(true);
	// barcode encoding data font style
	barcode.setTextFont(new Font("Arial", 0, 12));
	// space between barcode and barcode encoding data
	barcode.setTextMargin(6);
	
	//  barcode displaying angle
	barcode.setRotate(IBarcode.ROTATE_0);
	
	/*
	  to save into gif file, file name end with .gif
	  to save into jpeg file, file name end with .jpg
	  to save into eps file, call method drawBarcode2EPS and file name end with .eps
	*/
	barcode.drawBarcode("C:\\codabar.gif");


Java Barcode Generation Demo Source Codes:









OnBarcode is a market-leading provider of barcode generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides high quality tutorials and guides for various linear, 2d barcode information, such as C# Barcode, QR Code C#, QR Code VB.NET, QR Code ASP.NET, QR Code .NET, ASP.NET Barcode. OnBarcode products support most common barcode symbologies including QRCode C# SDK, Data Matrix in C#.net Control, PDF-417 Component in C# .NET, Code 128 VS .net sdk, Code 39 C# library.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.