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

    Contains options specific to the UPC-A symbology.

    Namespace: DevExpress.Docs.Barcode

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

    Declaration

    public class UPCAOptions :
        EAN13Options

    Remarks

    The following code snippet creates a Universal Product Code (UPC-A) barcode and specifies its settings:

    DevExpress Barcode Generator - UPC-A barcode

    using DevExpress.Docs.Barcode;
    using DevExpress.Drawing;
    using System.Drawing;
    
    var upcaOptions = new UPCAOptions();
    upcaOptions.BackColor = Color.LightGray;
    upcaOptions.ShowText = false;
    upcaOptions.Padding = new Padding(5);
    upcaOptions.BorderWidth = 1;
    upcaOptions.BorderColor = Color.Blue;
    
    using var upcaOptionsStream = new FileStream(Path.Combine(outDir, "barcode_symbology_upca.png"), FileMode.Create, FileAccess.Write);
    using var upcaOptionsGenerator = new BarcodeGenerator(upcaOptions);
    upcaOptionsGenerator.Export("72527273070", upcaOptionsStream, DXImageFormat.Png);
    
    See Also