Skip to main content

UPC-E0

  • 2 minutes to read

UPC-E0 is a compact UPC-A variant that removes extra zeros for small-package labeling. The symbol uses number system 0 and derives its check digit from the original UPC-A value.

View Example

Examples

Configure Barcode Settings (UPCE0Options)

Use the UPCE0Options class to configure UPC-E0 barcode settings.

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

DevExpress Barcode Generator - UPC-E0 barcode

using DevExpress.Docs.Barcode;
using DevExpress.Drawing;
using System.Drawing;

var upce0Options = new UPCE0Options();
upce0Options.BackColor = Color.LightGray;
upce0Options.ShowText = false;
upce0Options.Padding = new Padding(5);
upce0Options.BorderWidth = 1;
upce0Options.BorderColor = Color.Blue;

using var upce0OptionsStream = new FileStream(Path.Combine(outDir, "barcode_symbology_upce0.png"), FileMode.Create, FileAccess.Write);
using var upce0OptionsGenerator = new BarcodeGenerator(upce0Options);
upce0OptionsGenerator.Export("4210000526", upce0OptionsStream, DXImageFormat.Png);

Configure Barcode Settings (Fluent API)

Use the UPCE0OptionsBuilder class to configure UPC-E0 barcode settings with Fluent API.

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

DevExpress Barcode Generator - UPC-E0 barcode

using DevExpress.Docs.Barcode;
using DevExpress.Drawing;
using System.Drawing;

var upce0code = UPCE0OptionsBuilder.Create()
    .WithBackColor(Color.LightGray)
    .WithShowText(false)
    .WithPadding(5)
    .WithBorderWidth(1)
    .WithBorderColor(Color.Blue)
    .Build();

var filePath = Path.GetFullPath("upce0_code.png");

using var stream = new FileStream(filePath, FileMode.Create);
using var generator = new BarcodeGenerator(upce0code);
generator.Export("4210000526", stream, DXImageFormat.Png);

Symbology-Specific Options

This symbology has no additional options.

See Also