using IronBarCode;// Specify Code 128 FormatGeneratedBarcode barcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.Code128);// Add barcode value text below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save it as JPGbarcode.SaveAsJpeg("code128-sample.jpg");
using IronBarCode;
// Specify Code 128 Format
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.Code128);
// Add barcode value text below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save it as JPG
barcode.SaveAsJpeg("code128-sample.jpg");
ImportsIronBarCode' Specify Code 128 FormatDim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.Code128)' Add barcode value text below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save it as JPGbarcode.SaveAsJpeg("code128-sample.jpg")
Imports IronBarCode
' Specify Code 128 Format
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode("https://ironsoftware.com/csharp/barcode/", BarcodeEncoding.Code128)
' Add barcode value text below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save it as JPG
barcode.SaveAsJpeg("code128-sample.jpg")
using IronBarCode;// Valid GS1-128 String: GTIN + Expiry + Batch + Serial Numberstring gs1Value = "(01)01234567890128(17)251231(10)BATCH001(21)111111";// Create the barcodeGeneratedBarcode barcode = BarcodeWriter.CreateBarcode(gs1Value, BarcodeEncoding.Code128GS1);// Display the value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("gsi128-sample.jpg");
using IronBarCode;
// Valid GS1-128 String: GTIN + Expiry + Batch + Serial Number
string gs1Value = "(01)01234567890128(17)251231(10)BATCH001(21)111111";
// Create the barcode
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(gs1Value, BarcodeEncoding.Code128GS1);
// Display the value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("gsi128-sample.jpg");
ImportsIronBarCode' Valid GS1-128 String: GTIN + Expiry + Batch + Serial NumberDim gs1Value AsString = "(01)01234567890128(17)251231(10)BATCH001(21)111111"' Create the barcodeDim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(gs1Value, BarcodeEncoding.Code128GS1)' Display the value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("gsi128-sample.jpg")
Imports IronBarCode
' Valid GS1-128 String: GTIN + Expiry + Batch + Serial Number
Dim gs1Value As String = "(01)01234567890128(17)251231(10)BATCH001(21)111111"
' Create the barcode
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(gs1Value, BarcodeEncoding.Code128GS1)
' Display the value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("gsi128-sample.jpg")
using IronBarCode;// Specify Code39 FormatGeneratedBarcode barcode = BarcodeWriter.CreateBarcode("IRON-1234", BarcodeEncoding.Code39);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("code39.jpg");
using IronBarCode;
// Specify Code39 Format
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode("IRON-1234", BarcodeEncoding.Code39);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("code39.jpg");
ImportsIronBarCode' Specify Code39 FormatDim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode("IRON-1234", BarcodeEncoding.Code39)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("code39.jpg")
Imports IronBarCode
' Specify Code39 Format
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode("IRON-1234", BarcodeEncoding.Code39)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("code39.jpg")
using IronBarCode;// Valid Input: Uppercase A-Z, 0-9, specific symbolsstring code93Value = "ELEC-COMP-99";// Create Code 93GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(code93Value, BarcodeWriterEncoding.Code93);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("code93.jpg");
using IronBarCode;
// Valid Input: Uppercase A-Z, 0-9, specific symbols
string code93Value = "ELEC-COMP-99";
// Create Code 93
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(code93Value, BarcodeWriterEncoding.Code93);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("code93.jpg");
ImportsIronBarCode' Valid Input: Uppercase A-Z, 0-9, specific symbolsDim code93Value AsString = "ELEC-COMP-99"' Create Code 93Dim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(code93Value, BarcodeWriterEncoding.Code93)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("code93.jpg")
Imports IronBarCode
' Valid Input: Uppercase A-Z, 0-9, specific symbols
Dim code93Value As String = "ELEC-COMP-99"
' Create Code 93
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(code93Value, BarcodeWriterEncoding.Code93)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("code93.jpg")
using IronBarCode;// Valid Input: Numbers 0-9 and symbols -$:/.+ IronBarcode automatically appends by A, B, C, or Dstring codabarValue = "10500200";// Create CodabarGeneratedBarcode barcode = BarcodeWriter.CreateBarcode(codabarValue, BarcodeWriterEncoding.Codabar);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("codabar.jpg");
using IronBarCode;
// Valid Input: Numbers 0-9 and symbols -$:/.+ IronBarcode automatically appends by A, B, C, or D
string codabarValue = "10500200";
// Create Codabar
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(codabarValue, BarcodeWriterEncoding.Codabar);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("codabar.jpg");
ImportsIronBarCode' Valid Input: Numbers 0-9 and symbols -$:/.+ IronBarcode automatically appends by A, B, C, or DDim codabarValue AsString = "10500200"' Create CodabarDim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(codabarValue, BarcodeWriterEncoding.Codabar)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("codabar.jpg")
Imports IronBarCode
' Valid Input: Numbers 0-9 and symbols -$:/.+ IronBarcode automatically appends by A, B, C, or D
Dim codabarValue As String = "10500200"
' Create Codabar
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(codabarValue, BarcodeWriterEncoding.Codabar)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("codabar.jpg")
using IronBarCode;// Valid Input: Exactly 14 digits (GTIN). IronBarcode will calculate and append the correct check digitstring databarValue = "0123456789012";// Create GS1 DataBarGeneratedBarcode barcode = BarcodeWriter.CreateBarcode(databarValue, BarcodeWriterEncoding.DataBar);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("databar.jpg");
using IronBarCode;
// Valid Input: Exactly 14 digits (GTIN). IronBarcode will calculate and append the correct check digit
string databarValue = "0123456789012";
// Create GS1 DataBar
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(databarValue, BarcodeWriterEncoding.DataBar);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("databar.jpg");
ImportsIronBarCode' Valid Input: Exactly 14 digits (GTIN). IronBarcode will calculate and append the correct check digitDim databarValue AsString = "0123456789012"' Create GS1 DataBarDim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(databarValue, BarcodeWriterEncoding.DataBar)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("databar.jpg")
Imports IronBarCode
' Valid Input: Exactly 14 digits (GTIN). IronBarcode will calculate and append the correct check digit
Dim databarValue As String = "0123456789012"
' Create GS1 DataBar
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(databarValue, BarcodeWriterEncoding.DataBar)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("databar.jpg")
using IronBarCode;// Valid Input: 12 digits (library calculates 13th check digit) or full 13 digits.string ean13Value = "4006381333931";// Create EAN-13GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(ean13Value, BarcodeWriterEncoding.EAN13);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("ean13.jpg");
using IronBarCode;
// Valid Input: 12 digits (library calculates 13th check digit) or full 13 digits.
string ean13Value = "4006381333931";
// Create EAN-13
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(ean13Value, BarcodeWriterEncoding.EAN13);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("ean13.jpg");
ImportsIronBarCode' Valid Input: 12 digits (library calculates 13th check digit) or full 13 digits.Dim ean13Value AsString = "4006381333931"' Create EAN-13Dim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(ean13Value, BarcodeWriterEncoding.EAN13)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("ean13.jpg")
Imports IronBarCode
' Valid Input: 12 digits (library calculates 13th check digit) or full 13 digits.
Dim ean13Value As String = "4006381333931"
' Create EAN-13
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(ean13Value, BarcodeWriterEncoding.EAN13)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("ean13.jpg")
using IronBarCode;// Valid Input: 7 digits (library calculates 8th check digit).string ean8Value = "1234567";// Create EAN-8GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(ean8Value, BarcodeWriterEncoding.EAN8);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("ean8.jpg");
using IronBarCode;
// Valid Input: 7 digits (library calculates 8th check digit).
string ean8Value = "1234567";
// Create EAN-8
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(ean8Value, BarcodeWriterEncoding.EAN8);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("ean8.jpg");
ImportsIronBarCode' Valid Input: 7 digits (library calculates 8th check digit).Dim ean8Value AsString = "1234567"' Create EAN-8Dim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(ean8Value, BarcodeWriterEncoding.EAN8)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("ean8.jpg")
Imports IronBarCode
' Valid Input: 7 digits (library calculates 8th check digit).
Dim ean8Value As String = "1234567"
' Create EAN-8
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(ean8Value, BarcodeWriterEncoding.EAN8)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("ean8.jpg")
using IronBarCode;// Valid Input: Numeric digits only. Variable length.string msiValue = "1234567890";// Create MSIGeneratedBarcode barcode = BarcodeWriter.CreateBarcode(msiValue, BarcodeWriterEncoding.MSI);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("msi.jpg");
using IronBarCode;
// Valid Input: Numeric digits only. Variable length.
string msiValue = "1234567890";
// Create MSI
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(msiValue, BarcodeWriterEncoding.MSI);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("msi.jpg");
ImportsIronBarCode' Valid Input: Numeric digits only. Variable length.Dim msiValue AsString = "1234567890"' Create MSIDim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(msiValue, BarcodeWriterEncoding.MSI)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("msi.jpg")
Imports IronBarCode
' Valid Input: Numeric digits only. Variable length.
Dim msiValue As String = "1234567890"
' Create MSI
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(msiValue, BarcodeWriterEncoding.MSI)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("msi.jpg")
using IronBarCode;// Valid Input: 11 digits (library calculates 12th check digit) or full 12 digitsstring upcaValue = "01234567890";// Create UPC-AGeneratedBarcode barcode = BarcodeWriter.CreateBarcode(upcaValue, BarcodeWriterEncoding.UPCA);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPGbarcode.SaveAsJpeg("upca.jpg");
using IronBarCode;
// Valid Input: 11 digits (library calculates 12th check digit) or full 12 digits
string upcaValue = "01234567890";
// Create UPC-A
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(upcaValue, BarcodeWriterEncoding.UPCA);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG
barcode.SaveAsJpeg("upca.jpg");
ImportsIronBarCode' Valid Input: 11 digits (library calculates 12th check digit) or full 12 digitsDim upcaValue AsString = "01234567890"' Create UPC-ADim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(upcaValue, BarcodeWriterEncoding.UPCA)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPGbarcode.SaveAsJpeg("upca.jpg")
Imports IronBarCode
' Valid Input: 11 digits (library calculates 12th check digit) or full 12 digits
Dim upcaValue As String = "01234567890"
' Create UPC-A
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(upcaValue, BarcodeWriterEncoding.UPCA)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG
barcode.SaveAsJpeg("upca.jpg")
using IronBarCode;// Valid input: 8 digits or less in which the last digit is a check digit// IronBarcode automatically calculates the check digit if only 7 digits are provided.string upceValue = "0123456";// Create UPC-EGeneratedBarcode barcode = BarcodeWriter.CreateBarcode(upceValue, BarcodeWriterEncoding.UPCE);// Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode();// Save as a JPG filebarcode.SaveAsJpeg("upce.jpg");
using IronBarCode;
// Valid input: 8 digits or less in which the last digit is a check digit
// IronBarcode automatically calculates the check digit if only 7 digits are provided.
string upceValue = "0123456";
// Create UPC-E
GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(upceValue, BarcodeWriterEncoding.UPCE);
// Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode();
// Save as a JPG file
barcode.SaveAsJpeg("upce.jpg");
ImportsIronBarCode' Valid input: 8 digits or less in which the last digit is a check digit' IronBarcode automatically calculates the check digit if only 7 digits are provided.Dim upceValue AsString = "0123456"' Create UPC-EDim barcode AsGeneratedBarcode = BarcodeWriter.CreateBarcode(upceValue, BarcodeWriterEncoding.UPCE)' Stamp barcode value below the barcodebarcode.AddBarcodeValueTextBelowBarcode()' Save as a JPG filebarcode.SaveAsJpeg("upce.jpg")
Imports IronBarCode
' Valid input: 8 digits or less in which the last digit is a check digit
' IronBarcode automatically calculates the check digit if only 7 digits are provided.
Dim upceValue As String = "0123456"
' Create UPC-E
Dim barcode As GeneratedBarcode = BarcodeWriter.CreateBarcode(upceValue, BarcodeWriterEncoding.UPCE)
' Stamp barcode value below the barcode
barcode.AddBarcodeValueTextBelowBarcode()
' Save as a JPG file
barcode.SaveAsJpeg("upce.jpg")
How can I resolve formatting errors with GS1-128 barcodes?
Ensure that your barcode string follows the GS1-128 standards, starting with the FNC1 character and correctly formatted application identifiers. IronBarcode helps by throwing exceptions for non-compliant strings, which you can address using the GS1-128 troubleshooting guide.
What makes Code 39 suitable for the automotive industry?
Code 39 is favored in the automotive industry due to its ability to encode alphanumeric data without requiring check digits, simplifying environments where data integrity is verified by other means.
How does IronBarcode handle different output formats?
IronBarcode allows you to save generated barcodes in various output formats like JPEG, ensuring seamless integration with existing systems through flexible export options.
Why should I use Intelligent Mail Barcode for USPS applications?
Intelligent Mail Barcode is a USPS standard that optimizes mail sorting and enables tracking, requiring specific numeric lengths to ensure compliance and qualify for postal discounts.