Free Support Forum - aspose.com

Maximum Number of characters for Code Text for Data Matrix Barcode

Hi,



I couldn’t find any information about maximum allowed characters for Code Text for Data Matrix.



So far, this is what I have found.



The maximum capacity allowed by Aspose is following ( determine this by testing, not from documentation )

1- Square Data Matrix (144x144) – 1558 characters

2- Rectangle Data Matrix (16x48) – 49 characters





which is kind a different than what is mentioned in the standard documentation ( Image Attached )



I am using Default Encoding and alpha numeric data as code text.



Please let me know

Hi Imran,


Thank you for contacting support. Are you using the latest version of Aspose.BarCode for .NET 7.0.0? The BarCodeBuilder class has DataMatrixEncodeMode property. You can use DataMatrixEncodeMode enum to set its value. It has three types of modes (auto, full and ASCII). Please check it with ASCII mode. We hope, this helps. In case this does not help then please also provide us complete your sample code. We’ll take a closer look and reply you accordingly.

I am using Aspose.BarCode for .NET 6.9.0.0.



Attached Code is working fine until I provide data more than 49 characters in “CodeText”.

Hi Imran,


Thank you for posting details. We have logged an investigation to enhance DataMatrix code encoding. We have logged this task under ticket id BARCODENET-34208 in our issue tracking system. Your post has also been linked to this issue. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.

Hi Imran,


Thank you for being patient. Please note, in your rectangle DataMatrix code example, ASCII mode allows encode up to 49 characters or 98 digits or mix(e.g. 40 chars+18 digits). In accordance with 5.2.3. ISO IEC 16022, ASCII data is encoded as codewords, so it is limited by values from the codewords capacity. Similar is the case with your second square DataMatrix code example, you can encode 1558 characters or 3116 digits or mix (e.g. 800 chars+1516). Please check it using the latest version of Aspose.BarCode for .NET 7.0.0 and let us know your precious feedback. We hope, this helps.