A newer version of this page is available. Switch to the current version.


  • 3 minutes to read

Short Description

UPC-E is a kind of UPC-A, which allows a more compact bar code by eliminating “extra” zeros. Since the resulting UPC-E bar code is about half the size of the UPC-A bar code, UPC-E is generally used on products with a very small packaging where a full UPC-A bar code does not fit.

The UPC-E1 is a variation of UPC-E code with the number system set to “1“. In the human readable string of the bar code the first digit signifies the number system (always 1 for this code type), the last digit is the check digit of the original UPC-A code.

In the example below, the original UPC-A code is “14210000526“. We should remove the leading “1“ when assigning the string to the control’s property, since the code format itself implies its presence. The checksum digit (1) is calculated automatically, and the symbology algorithm transforms the rest of the numeral string. The result is 425261, and it is encoded along with the number system prefix and the check digit into the scanner-readable form.

Barcode - UPC-E1

Not every UPC-A code can be transformed into the UPC-E1. Refer to the UPC-E Symbology specification (available elsewhere) for more information.

Since the number system “1“ is not used in regular UPC-A codes, the UPC-E1 symbology use is uncommon.

Bar Code Properties

The type of a bar code control’s Symbology property is UPCE1Generator.

The are no properties specific to the UPC-E1 bar code type.


The following code creates a UPC-E1 bar code and specifies its main properties.

using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Windows.Forms;
using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraReports.UI;
// ...
public XRBarCode CreateUPCE1BarCode(string BarCodeText) {
    // Create a bar code control.
    XRBarCode barCode = new XRBarCode();

    // Set the bar code's type to UPC-E1.
    barCode.Symbology = new UPCE1Generator();

    // Adjust the bar code's main properties.
    barCode.Text = BarCodeText;
    barCode.Width = 400;
    barCode.Height = 100;

    return barCode;

To add the XRBarCode to a report band, handle the report’s XRControl.BeforePrint event.

using System.Drawing.Printing;
// ...

private void XtraReport1_BeforePrint(object sender, PrintEventArgs e) {