Max text in barcode image

I am using apsose barcode .net SDK to generate barcode images, I have requirement that barcode image must be 1.5 * 1.5 inch , I need to know how to calculate the max number of characters this images could have. I am using DataMatrix AND Code 128

Hi,

Thank you for inquiry.

I am sorry there is no way currently to determine the maximum numbers of characters that can fit in the barcode image of specified size.

You may refer to http://www.aspose.com/documentation/.net-components/aspose.barcode-for-.net/adjusting-2d-images-size.html article for adjusting the image size and find out the maximum codetext characters that can fit.

Please also try to recognize the barcode image to verify that the generated image can be recognized correctly.

// code to generate the barcode after setting autosize to false and other properties
BarCodeBuilder builder = …
builder.Save(“test.png”);

// see if this barcode can also be recognized
BarCodeReader reader = …
if (reader.Read())