UPC Supplemental 2
- 2 minutes to read
UPC Supplemental 2 adds a 2-digit issue code to a main UPC barcode. The supplement keeps the primary product code constant while tracking periodical issues.
Examples
Configure Barcode Settings (UPCSupplemental2Options)
Use the UPCSupplemental2Options class to configure UPC Supplemental 2 barcode settings.
The following code snippet creates a Universal Product Code (UPC) Supplemental 2-Digit barcode and specifies its settings:

using DevExpress.Docs.Barcode;
using DevExpress.Drawing;
using System.Drawing;
var upcSup2Options = new UPCSupplemental2Options();
upcSup2Options.BackColor = Color.LightGray;
upcSup2Options.ShowText = false;
upcSup2Options.Padding = new Padding(5);
upcSup2Options.BorderWidth = 1;
upcSup2Options.BorderColor = Color.Blue;
using var upcSup2OptionsStream = new FileStream(Path.Combine(outDir, "barcode_symbology_upc_supplemental2.png"), FileMode.Create, FileAccess.Write);
using var upcSup2OptionsGenerator = new BarcodeGenerator(upcSup2Options);
upcSup2OptionsGenerator.Export("4210000526", upcSup2OptionsStream, DXImageFormat.Png);
Configure Barcode Settings (Fluent API)
Use the UPCSupplemental2OptionsBuilder class to configure UPC Supplemental 2 barcode settings with Fluent API.
The following code snippet creates a Universal Product Code (UPC) Supplemental 2-Digit barcode and specifies its settings:

using DevExpress.Docs.Barcode;
using DevExpress.Drawing;
using System.Drawing;
var upcs2code = UPCSupplemental2OptionsBuilder.Create()
.WithBackColor(Color.LightGray)
.WithShowText(false)
.WithPadding(5)
.WithBorderWidth(1)
.WithBorderColor(Color.Blue)
.Build();
var filePath = Path.GetFullPath("upcs2_code.png");
using var stream = new FileStream(filePath, FileMode.Create);
using var generator = new BarcodeGenerator(upcs2code);
generator.Export("4210000526", stream, DXImageFormat.Png);
Symbology-Specific Options
This symbology has no additional options.
See Also