The Datamatrix code


Version française

This code is part of 2 dimentional code family, it can encode up to 2335 characters on a very small surface. The encoding is done in two stages : first the datas are converted to 8 bits "codeword" (High level encoding) then those are converted to small black and white squares. (Low level encoding) Moreover an error correction system is included, it allows to reconstitute badly printed, erased, fuzzy or torn off datas. In the continuation of this talk, the word "codeword" will be shortened into CW.

The general structure.

A 2 x 2 regions code :

Low level encoding.

High level encoding.

Errors detection and correction.

Bar code making.

Since we can create the bar code pattern it remains us to draw it on the screen and to print it on a paper sheet. Two approaches are possible :

It seems that there's no free datamatrix barcode font on the net. I've decided consequently to draw this font and to propose it for download. Since each symbol have an even row number and an even column number, I put in each character of the font 4 modules (2 rows and 2 columns). In this manner we have 16 combinations assigned to the 16 first capital letters.
If we give a value at each dot of this 2 x 2 matrix like this :

1

2

4

8

the ASCII value of the character associated to a given matrix is the sum of each dot value + 65 (65 = A = no dot !)

The " datamatrix.ttf " font

This font contains the 16 character A (ASCII : 65) to P (ASCII : 80)

Copy this file
in the font directory,
often named :
C:\WINDOWS\FONTS

Encoding a datamatrix barcode

The software will evolve with 4 steps :

Because of the interaction between the different compaction modes it's difficult to make a 100% optimization. Thus the software will split the string into "parts" having the type "numeric", "text" or "byte" afterwards it will change some parts for an other mode if the overload due to switch CWs is greater than the compaction gain. We'll can't make allowance for all the parameters like paddings, ...

 

 

 WORK IN PROGRESS

 

A small program to test all that

 

 

 

 WORK IN PROGRESS

 

 


Do you like this page ?


Is it useful for you
?

Click here !