0

I have to generate different data formats(Like 8x8,10x10,12x10 etc) of DataMatrix image using zxing library.currently based on data length automatic format will be set in the zxing library. So where we have to do the changes to take the data format in User end in zxing barcode generation library.

Praveen Kumar
  • 109
  • 1
  • 3
  • 11

1 Answers1

1

You can control the automatic format selection using the DatamatrixEncodingOptions:

            var writer = new BarcodeWriter
            {
                Format = BarcodeFormat.DATA_MATRIX,
                Options = new ZXing.Datamatrix.DatamatrixEncodingOptions
                {
                    SymbolShape = SymbolShapeHint.FORCE_...,
                    MinSize = new Dimension(<insert width here>, <insert height here>),
                    MaxSize = new Dimension(< insert width here >, < insert height here >)
                }
            };
            var image = writer.Write("<content here>");
Michael
  • 2,361
  • 1
  • 15
  • 15