C# - Generating data matrix 2d bar code. How to do it?

Posted by Clarkelucy under C# on 5/11/2017 | Points: 10 | Views : 1495 | Status : [Member] | Replies : 1
My working is usually in c# language on the windows format of visual studio 2015. The problem that I am facing is with generating data matrix to details like phone, address and name. With the mission to work for leading companies like https://www.ingic.ae/software-development/ I want to get my coding and programming sorted first. Thereby, I would love the community and experts to help me with it.
Another query is to know if there are any open source or free library accessible to generate data matrix 2d bar-code for details like name, address and phone. I know that it can be generated through qr message toolkit library. Again the problem is to know which C# code can be used for the generation of data matrix. Similarly which class library can be opted to do so?


Posted by: Prabahkar on: 12/11/2017 [Member] Starter | Points: 25

check this link

BarcodeSettings settings = new BarcodeSettings();
settings.Type = BarCodeType.DataMatrix;
settings.X = 1.5f;
settings.DataMatrixSymbolShape = DataMatrixSymbolShape.Square;
//rectangular DataMatrix barcode
//settings.DataMatrixSymbolShape = DataMatrixSymbolShape.Rectangle;
settings.Data = "ABC 123456789ABC 123456789ABC 123456789";
settings.Data2D = "ABC 123456789ABC 123456789ABC 123456789";
BarCodeGenerator generator = new BarCodeGenerator(settings);
Image image = generator.GenerateImage();
image.Save("DataMatrix.png", System.Drawing.Imaging.ImageFormat.Png);

Clarkelucy, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response