Skip to main content

EAN-128 (UCC)

  • 2 minutes to read

GS1-128 (EAN-128) encodes data with GS1 Application Identifiers to define data meaning. The symbology targets global data exchange and supply chain labeling workflows.

View Example

Examples

Configure Barcode Settings (EAN128Options)

Use the EAN128Options class to configure EAN-128 barcode settings.

The following code snippet creates an EAN128 barcode and customizes its options:

DevExpress Barcode Generator - EAN128 barcode

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

var code128Options = new Code128Options();
code128Options.ShowText = true;
code128Options.Charset = Code128CharacterSet.CharsetB;
code128Options.AddLeadingZero = true;
code128Options.Padding = new Padding(5);
code128Options.BorderWidth = 1;
code128Options.FNC1Substitute = "<FNC1>";
code128Options.FNC2Substitute = "<FNC2>";
code128Options.FNC3Substitute = "<FNC3>";

using var code128OptionsStream = new FileStream(Path.Combine(outDir, "barcode_symbology_code128.png"), FileMode.Create, FileAccess.Write);
using var code128OptionsGenerator = new BarcodeGenerator(code128Options);
code128OptionsGenerator.Export("<FNC1>12345<FNC2>67<FNC3>89", code128OptionsStream, DXImageFormat.Png);

Configure Barcode Settings (Fluent API)

Use the EAN128OptionsBuilder class to configure EAN-128 barcode settings with Fluent API.

The following code snippet creates an EAN128 barcode and customizes its options:

DevExpress Barcode Generator - EAN128 barcode

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

var ean128Options = EAN128OptionsBuilder.Create()
    .WithShowText(false)
    .WithPadding(5)
    .WithBorderWidth(1)
    .Build();

using var ean128OptionsStream = new FileStream(Path.Combine(outDir, "barcode_symbology_ean128.png"), FileMode.Create, FileAccess.Write);
using var ean128OptionsGenerator = new BarcodeGenerator(ean128Options);

ean128OptionsGenerator.Export("(01)09521234543213(10)ABC123", ean128OptionsStream, DXImageFormat.Png);

Symbology-Specific Options

Property Description
Charset Gets or sets the character set used for encoding.
FNC1Substitute Gets or sets the character that is used as a substitute for the FNC1 separator in EAN-128 input data.
HumanReadableText Gets or sets whether the human-readable text is displayed for the EAN128 barcode.
See Also