Java Data Matrix Generator Library SDK Integration & Developer Guide

Generate 2d barcode Data Matrix images in Java class, Servlet, JSP, J2EE with complete sample Java source code


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


Index
 

Java Data Matrix Generator Introduction

Data Matrix, also known as Data Matrix ECC200, is great 2-dimensional matrix barcode to store different data up to 2,335 alphanumeric characters.

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

Data Matrix Generator and Reader library, SDK & application
Data Matrix Generator components and software include Data Matrix .NET, Data Matrix C#, Data Matrix VB.NET, Data Matrix ASP.NET, Data Matrix iPhone, Data Matrix iPad, Data Matrix Android, Data Matrix Generator.

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

 

Generate Data Matrix Barcodes in Java

Generating Data Matrix barcode in Java class example:

	DataMatrix barcode = new DataMatrix();
	
	/*
	   Data Matrix Valid data char set:
	        ASCII values 0 - 127 in accordance with the US national version of ISO/IEC 646
	            ASCII values 128 - 255 in accordance with ISO 8859-1. These are referred to as extended ASCII.
	
	*/
	barcode.setData("112233445566");
	
	barcode.setDataMode(DataMatrix.M_AUTO);
	
	// if your selected format mode doesnot have enough space to encode your data,
	// the library will choose the right format mode for you automatically.
	barcode.setFormatMode(DataMatrix.F_10X10);
	
	//  Set the processTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is false.
	//  1-byte character: ~ddd (character value from 0 ~ 255)
	//  ASCII (with EXT): from ~000 to ~255
	//  2-byte character: ~6ddddd (character value from 0 ~ 65535)
	//  Unicode: from ~600000 to ~665535
	//  ECI: from ~7000000 to ~7999999
	barcode.setProcessTilde(true);
	
	// Data Matrix Unit of Measure, pixel, cm, or inch
	barcode.setUom(IBarcode.UOM_PIXEL);
	// Data Matrix barcode bar module width (X) in pixel
	barcode.setX(3f);
	
	barcode.setLeftMargin(10f);
	barcode.setRightMargin(10f);
	barcode.setTopMargin(10f);
	barcode.setBottomMargin(10f);
	// barcode image resolution in dpi
	barcode.setResolution(72);
	
	barcode.drawBarcode("C:\\datamatrix.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 barcode products are supported by RasterEdge .NET HTML5 Document Viewer high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.