DataMatrix is a two-dimensional
(2D) barcode symbology which can store from 1 to about 2,000 characters.
DataMatrix ECC200 version supports advanced encoding error checking and
correction algorithms (reed-solomon). Those algorithms allow the recognition of
barcodes that are up to 60% damaged.
DataMatrix is being used to encode product and serial number
information on electrical rating plates; to mark of surgical instruments in
Japan; to identify lenses, circuit boards, and other items during
manufacturing.
Barcode Library supports all DataMatrix Formats and the
data represented in the symbol can be compressed using one of following
algorithms.
ASCII (0): it is used to encode data that mainly contains ASCII characters (0-127). This is the default encoding format by Barcode Library.
C40 (1): it is used to encode data that mainly contains numeric and upper case
characters.
Text (2): it is used to encode data that mainly contains numeric and lower case
characters.
There are two ways to create barcode images in your Java web applications.
This is the simplest way to stream barcode image using our provided barcode servlet classes.
And it will not save barcode images in your server side.
Under demo package, copy barcode folder to your java servlet container like tomcat.
To test your installation, goto http://YourDomain:Port/barcode/datamatrix?Data=123456789
To create barcode image in your JSP page, you can pass the url to IMG tag src value.
For example, <img src="http://YourDomain:Port/barcode/datamatrix?Data=123456789" />
The second method is similar with the way to generate barcode in Java applications.
This is the barcode text to be encoded. The type is String.
format
Format
DataMatrix.FORMAT_10X10 (0)
Valid values are from 0 to 29.
encoding
Encoding
AUTO (4)
5 Valid Options: ASCII (0), C40 (1), TEXT (2), BASE256 (3), AUTO (4)
processTilde
ProcessTilde
true
Set the ProcessTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is true. ~NNN: is used to represent the ASCII character with the value of NNN.
Image Size and Style
uom
UOM
0 (pixel)
Unit of measure for barcode size settings, type is float, default is 0 (pixel). Valid values are 0 (pixel), 1 (CM), 2 (Inch)
resolution
Resolution
96
Image resolution. Default is 96 DPI.
moduleSize
ModuleSize
1
Set the moduleSize property for bar cells width.
This value will decide the whole barcode image width and height. Its unit of measure is decided by uom.
leftMargin
LeftMargin
0
Image left margin. Its unit of measure is decided by uom.
rightMargin
RightMargin
0
Image right margin. Its unit of measure is decided by uom.
topMargin
TopMargin
0
Image top margin. Its unit of measure is decided by uom.
bottomMargin
BottomMargin
0
Image bottom margin. Its unit of measure is decided by uom.
Copyright 2008 BarcodeLib.com. Provides High Quality Barcode Data Matrix for Java,
Barcode Data Matrix for JasperReports Library. All rights reserved.