Data Matrix is a two-dimensional (2D) matrix symbology which is made up of square modules arranged within a perimeter finder pattern. It can encode up to 3116 characters from the entire 256 byte ASCII character set. The symbol consists of data regions which contain square modules set out in a regular array. Large ECC 200 symbols contain several regions. Each data region is delimited by a finder pattern, and this is surrounded on all four sides by a quiet zone border (margin).
ECC 200 symbols have an even number of rows and an even number of columns. Most of the symbols are square with sizes from 10 x 10 to 144 x 144. Some symbols however are rectangular with sizes from 8 x 18 to 16 x 48. All ECC 200 symbols can be recognized by the upper right corner module being light (binary 0).
ECC200 is the newest version of data matrix and supports advanced encoding error checking and correction algorithms (reed-solomon). This algorithms allow the recognition of barcodes that are up to 60% damaged.
The barcode supports two optional mechanisms:
RDataMatrixX supports:
RDataMatrix supports all data matrix formats. The following table contains the size , the capacity and the correction error features of each format:
Size |
Numeric Capacity |
Alphanumeric capacity |
Binary capacity |
Max Correctable Error/Erasure |
10 x 10 |
6 |
3 |
1 |
2 |
12 x 12 | 10 | 6 | 3 | 3 |
14 x 14 | 16 | 10 | 6 | 5/7 |
16 x 16 | 24 | 16 | 10 | 6/9 |
18 x 18 |
36 |
25 |
16 |
7/11 |
20 x 20 | 44 | 31 | 20 | 9/15 |
22 x 22 |
60 |
43 |
28 |
10/17 |
24 x 24 |
72 |
52 |
34 |
12/21 |
26 x 26 |
88 |
64 |
42 |
14/25 |
32 x 32 | 124 | 91 | 60 | 18/33 |
36 x 36 | 172 | 127 | 84 | 21/39 |
40 x 40 | 228 | 169 | 112 | 24/45 |
44 x 44 | 288 | 214 | 142 | 28/53 |
48 x 48 | 348 | 259 | 172 | 34/65 |
52 x 52 | 408 | 304 | 202 | 42/78 |
64 x 64 | 560 | 418 | 278 | 56/106 |
72 x 72 | 736 | 550 | 366 | 72/132 |
80 x 80 | 912 | 682 | 454 | 96/180 |
88 x 88 | 1152 | 862 | 574 | 112/212 |
96 x 96 | 1392 | 1042 | 694 | 136/260 |
104 x 104 | 1632 | 1222 | 814 | 168/318 |
120 x 120 | 2100 | 1573 | 1048 | 204/390 |
132 x 132 | 2608 | 1954 | 1302 | 248/472 |
144 x 144 | 3116 | 2335 | 1556 | 310/590 |
8 x 18 | 10 | 6 | 3 | 3 |
8 x 32 | 20 | 13 | 8 | 5 |
12 x 26 | 32 | 22 | 14 | 7/11 |
12 x 36 | 44 | 31 | 20 | 9/15 |
16 x 36 | 64 | 46 | 30 | 12/21 |
16 x 48 | 98 | 72 | 47 | 14/25 |
The data represented in the symbol can be compressed using one or several of the following algorithms:
All encoding system can be used to encode any data, but for example, encoding binary data with C40 generates much more overhead (longer symbol) than with BASE256.
RDataMatrix uses the character ~ to recognize some special characters in the input data. The following possibilities are available:
You can find more information about data matrix at:
If you want to uninstall the OCX you can do it by means of uninstall.bat.
Boths programs just run the regsvr32.exe windows tool in order to register and unregister OCX's.
The ActiveX has been developed using Visual Basic 6.0. For this reason it needs the following files:
Visual Basic
In the subdirectory Examples/VB you will find a visual basic 6.0 project you can use to test the ActiveX. The project is already compiled, you can execute it by means of exampleDM.exe.
The ActiveX can be inserted into your MSAccess forms and reports. If you want to retrieve a value from the database before you create the barcode you can do it this way:
The ActiveX can also be used in your web applications when you use ASP. The following code shows how this can be done:
<%@ LANGUAGE="VBSCRIPT" %>
<%set bc=server.createobject("RDatamatrixX.RDMx")
bc.standalone=true
bc.barcode=98765432
bc.encoding=5 'AUTO
bc.preferredFormat=-1 ' AUTO
bc.saveToBMP("c:\inetpub\wwwroot\datamatrix")
set bc=nothing<HTML>
<BODY>
RDATAMATRIXX<BR>
<img src="datamatrix.bmp">
</BODY>
</HTML>
this script uses RDatamatrixX in order to create a bmp image that can be display in the browser. If you want to use another format (not BMP) you can use external tools for the conversion. The following example uses the JanGraphics freeware library to convert the bmp to a png file:
<%@ LANGUAGE="VBSCRIPT" %>
<%set bc=server.createobject(""RDatamatrixX.RDMx")
bc.standalone=true
bc.barcode=98765432
bc.saveToBMP("c:\inetpub\wwwroot\datamatrix")
set bc=nothingset conv=createobject("janGraphics.Compendium")
conv.convert "c:\inetpub\wwwroot\datamatrix.bmp","c:\inetpub\wwwroot\datamatrix.png"
set conv=nothing
%>
Methods
- paintBarcode(): forces the barcode to be repainted.
- saveToBMP(filename): saves the barcodes to a BMP file.
- setSize(width,height): sets the size of the image to be created (for use from ASP)
Properties
- standalone: muts be set to "true" if the activeX is going to be used without Container/Form (for example in ASP or VB Script).
- applyTilde: process the " ~ " in the string to be encoded.
- barBackColor: background color.
- barForeColor: foreground color (color of the pixels).
- barcode: string to be encoded.
- encoding: encoding to be used:
- Ascii encoding=0
- C40 encoding =1
- Text encoding=2
- Base256 encoding= 3
- None = 4
- Automatic=5
- preferredFormat: format to be used:
- AUTOMATIC= -1 (default)
- C10X10 = 0
- C12X12 = 1
- C14X14 = 2
- C16X16 = 3
- C18X18 = 4
- C20X20 = 5
- C22X22 = 6
- C24X24 = 7
- C26X26 = 8
- C32X32 = 9
- C36X36 = 10
- C40X40 = 11
- C44X44 = 12
- C48X48 = 13
- C52X52 = 14
- C64X64 = 15
- C72X72 = 16
- C80X80 = 17
- C88X88 = 18
- C96X96 = 19
- C104X104 = 20
- C120X120 = 21
- C132X132 = 22
- C144X144 = 23
- C8X18 = 24
- C8X32 = 25
- C12X26 = 26
- C12X36 = 27
- C16X36 = 28
- C16X48 = 29
- paintedWidth (readonly): real size of the barcode. The value is set after the barcode is painted. Can be use to create an image of the exact size.
- paintedHeight (readonly): real size of the barcode. Can be use to create an image of the exact size.
- barLeftmargin: left margin in pixels (default is 10).
- barTopMargin: top margin in pixels (default is 10).
- dotsPixel: size of the dots (in pixels) of the matrix.