UPC Supplemental 5
- 2 minutes to read
UPC Supplemental 5 adds a 5-digit price or issue code to a main UPC barcode. The supplement is commonly used on books and periodicals.
Examples
Configure Barcode Settings (UPCSupplemental5Options)
Use the UPCSupplemental5Options class to configure UPC Supplemental 5 barcode settings.
The following code snippet creates a Universal Product Code (UPC) Supplemental 5-Digit barcode and specifies its settings:

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

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