Skip to main content

Interleaved 2 of 5

  • 2 minutes to read

Interleaved 2 of 5 is a higher-density numeric symbology based on Standard 2 of 5. The symbology is used in distribution and warehouse workflows.

View Example

Examples

Configure Barcode Settings (Interleaved2of5OptionsAztecCodeOptions)

Use the Interleaved2of5Options class to configure Interleaved 2 of 5 barcode settings.

The following code snippet creates the Interleaved 2 of 5 barcode and customizes its options:

DevExpress Barcode Generator - Interleaved 2 of 5 barcode

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

var int2of5Options = new Interleaved2of5Options();
int2of5Options.CalculateChecksum = true;
int2of5Options.WideNarrowRatio = 3;
int2of5Options.BackColor = Color.LightGray;
int2of5Options.ShowText = false;
int2of5Options.Padding = new Padding(5);
int2of5Options.BorderWidth = 1;
int2of5Options.BorderColor = Color.Blue;

using var int2of5OptionsStream = new FileStream(Path.Combine(outDir, "barcode_symbology_interleaved_2of5.png"), FileMode.Create, FileAccess.Write);
using var int2of5OptionsGenerator = new BarcodeGenerator(int2of5Options);
int2of5OptionsGenerator.Export("0123456709498765432101234567891", int2of5OptionsStream, DXImageFormat.Png);

Configure Barcode Settings (Fluent API)

Use the Interleaved2of5OptionsBuilder class to configure Interleaved 2 of 5 barcode settings with Fluent API.

The following code snippet creates the Interleaved 2 of 5 barcode and customizes its options:

DevExpress Barcode Generator - Interleaved 2 of 5 barcode

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

var interleavedOptions = Interleaved2of5OptionsBuilder.Create()
    .WithCalculateChecksum(true)
    .WithWideNarrowRatio(3)
    .WithBackColor(Color.LightGray)
    .WithShowText(false)
    .WithPadding(5)
    .WithBorderWidth(1)
    .WithBorderColor(Color.Blue)
    .Build();

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

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

Symbology-Specific Options

Property Description
CalculateChecksum Gets or sets whether a check character should be calculated and added to the barcode data.
See Also