Skip to main content
All docs
V26.1
  • DataMatrixGS1OptionsBuilder Class

    Builds an DataMatrixGS1Options object. Chain builder methods to configure barcode settings, then call the Build method to create the options object.

    Namespace: DevExpress.Docs.Barcode

    Assembly: DevExpress.Docs.Core.v26.1.dll

    Declaration

    public class DataMatrixGS1OptionsBuilder :
        BarcodeOptionsBuilder<DataMatrixGS1Options, DataMatrixGS1OptionsBuilder>

    Remarks

    The following code snippet creates an Data Matrix GS1 barcode and customizes its options:

    DevExpress Barcode Generator - Data Matrix GS1 barcode

    using DevExpress.Docs.Barcode;
    using DevExpress.Drawing;
    using System.Drawing;
    
    var dmGs1Options = DataMatrixGS1OptionsBuilder.Create()
        .WithShowText(true)
        .WithPadding(5)
        .WithBorderWidth(1)
        .Build();
    
    using var dmGs1OptionsStream = new FileStream(Path.Combine(outDir, "barcode_symbology_datamatrix_gs1.png"), FileMode.Create, FileAccess.Write);
    using var dmGs1OptionsGenerator = new BarcodeGenerator(dmGs1Options);
    
    dmGs1OptionsGenerator.Export("(01)09521234543213(10)ABC123(17)280101", dmGs1OptionsStream, DXImageFormat.Png);
    
    See Also