[an error occurred while processing this directive]
 

The Datamatrix code

Version francaise
This code is part of the family of 2-dimensional codes, 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 term "codeword" will be abbreviated to CW and Reed-Solomon code in RS. There are also micro QR codes not studied here.

The general structure.

A 2 x 2 regions code :

Low level encoding.

High level encoding.

Errors detection and correction.

Bar code making.

Now that we know how to create a barcode pattern, we still have to draw it on the screen and print it on paper. Two approaches are possible :
It seems there is no free fontfor datamatrix barcode 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 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 to you ?

Click here !