• Data Matrix download

Print Data Matrix in C#

To print Data Matrix in C#, you need both bcsDataMatrix.ttf true type font and cruflbcsn.dll.

To get cruflbcsn.dll, you can either download it from Data Matrix C#.,
or you can generate cruflbcsn.dll if you already have cruflbcs.dll.
tlbimp is a utility of Windows SDK. It converts type definitions of a COM object to equivalent definitions in a common language runtime assembly that you can use in C#.
tlbimp cruflbcs.dll /out:cruflbcsn.dll

Add reference to cruflbcsn.dll from your C# project first.
Then use code snippet below to get QR Code in C#

using cruflbcsn;
cruflbcsn.IDataMatrix pDataMatrix = new CDataMatrix();
textBox2.Text = pDataMatrix.Encode(textBox1.Text);

Or you can use code snippet below to customize a DataMatrix in C#

using cruflbcsn;
cruflbcsn.IDataMatrix pDataMatrix = new CDataMatrix();
textBox2.Text = pDataMatrix.EncodeCR(textBox1.Text, 0, 1);

The first parameter is string to encode.
The second parameter is index. Always set it to zero please.
The third parameter is security level. Its values range between 0 and 3. It stands for L07, M15, Q25 and H30 separately

  • Data Matrix barcode download