How to Generate ITF-14 and Interleaved 2 of 5 Barcodes for Carton and Logistics Labeling
What Are ITF-14 and Interleaved 2 of 5 Barcodes?
ITF-14 is the standard barcode for cartons and shipping cases in global supply chains (encodes 14 digits). Interleaved 2 of 5 (I2of5) is a high-density numeric barcode used for warehouse, industrial, and distribution labeling, supporting variable even-length digit strings.
Quick Start (Minimal Example)
using Aspose.BarCode.Generation;
var generator = new BarcodeGenerator(EncodeTypes.ITF14, "1234567890123");
generator.Save("carton-itf14.png", BarCodeImageFormat.Png);
Table of Contents
- Introduction
- What Are ITF-14 and Interleaved 2 of 5 Barcodes?
- Quick Start (Minimal Example)
- Prerequisites
- Step-by-Step Implementation
- Customizing Barcode Appearance
- Supported Output Formats
- Troubleshooting & Common Issues
- FAQs
- Use Cases and Applications
- Best Practices
- Related Articles
- Conclusion
Introduction
This guide shows how to generate ITF-14 and Interleaved 2 of 5 barcodes for logistics, carton, and warehouse labeling using Aspose.BarCode for .NET, with full code, design tips, and solutions for supply chain automation.
Prerequisites
- Visual Studio 2019 or later
- .NET 6.0+ or .NET Framework 4.6.2+
- Aspose.BarCode for .NET (NuGet)
- Basic C# knowledge
PM> Install-Package Aspose.BarCode
Step-by-Step Implementation
ITF-14 Example:
using Aspose.BarCode.Generation;
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.ITF14, "1234567890123"); // 13 digits + auto-checksum
gen.Save("carton-itf14.png", BarCodeImageFormat.Png);
Interleaved 2 of 5 Example:
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.Interleaved2of5, "12345678"); // Even digits only
gen.Save("label-i2of5.png", BarCodeImageFormat.Png);
Customizing Barcode Appearance
- Bearer Bars (ITF-14):
csgen.Parameters.Barcode.ITF14.ITF14BorderType = ITF14BorderType.Frame; // Other options: Bar, None, etc.
- Bar Height/Width:
csgen.Parameters.Barcode.BarHeight.Pixels = 100; gen.Parameters.Barcode.XDimension.Pixels = 3;
- Color/Background:
csgen.Parameters.Barcode.BarColor = Color.Black; gen.Parameters.Barcode.BackColor = Color.White;
- Caption:
csgen.Parameters.CaptionBelow\.Visible = true;
Supported Output Formats
- PNG, JPEG, BMP – Print and digital labels
- TIFF – High-res/archival
- SVG, EMF – Vector/large format printing
Troubleshooting & Common Issues
Barcode not scanning?
- Ensure input is all digits, correct length, even digits for I2of5, proper contrast.
No frame on ITF-14?
- Set ITF14BorderType to Frame for GS1 supply chain compliance.
Too large for label?
- Adjust XDimension and bar height for smaller size.
FAQs
Q: Can I encode variable-length numbers with Interleaved 2 of 5? A: Yes, but only even numbers of digits.
Q: What’s the bearer bar/frame in ITF-14? A: A border around the barcode for supply chain/GS1 compliance and better scanner detection.
Use Cases and Applications
- Pallet and carton labeling (ITF-14)
- Warehouse/industrial inventory (I2of5)
- Shipping case barcodes
- Bulk supply chain automation
Best Practices: Quick Reference Table
Tip | Do | Don’t |
---|---|---|
Digit Length | ITF-14: 13, I2of5: even number | Odd digits for I2of5 |
Bearer Bars | Use Frame for ITF-14 compliance | No border for ITF-14 labels |
Output Format | Use PNG/SVG for crisp print | Low-res JPG for packaging |
Caption | Show below for clarity | Hide on warehouse labels |
Conclusion
ITF-14 and Interleaved 2 of 5 are the backbone of logistics and warehouse automation. Aspose.BarCode for .NET makes it easy to generate, export, and customize these barcodes for any supply chain or industrial workflow. See the Aspose.BarCode API Reference for more details.