|
.NET Barcode >
.NET Barcode Generate Guide >
.NET GS1-128/EAN-128 Generator for .NET, C#, ASP.NET, VB.NET
.NET GS1-128/EAN-128 Generator for .NET, C#, ASP.NET, VB.NET
Create & Generate GS1-128/EAN-128 Barcodes in C#, VB.NET, ASP.NET
GS1-128 is an application standard of the GS1 implementation using the Code 128 barcode specification. The former correct name was UCC/EAN-128. Other no longer used names have included UCC-128 and EAN-128. GS1-128 uses a series of Application Identifiers to include additional data such as best before dates, batch numbers, quantities, weights and many other attributes needed by the user.
.NET Barcode GS1-128/EAN-128 prints:
- all 128 characters of ASCII
- values 128-255 in accordance with ISO 8859-1. There are referred to as extended ASCII.
The GS1-128 barcode above encodes a production date as Jan 01, 2009
1. How to generate GS1-128/EAN-128 barcodes in C# Class?
using BusinessRefinery.Barcode;
// construct a linear barcode object
Linear barcode = new Linear();
// set linear barcode symbolgoy to GS1-128/EAN-128
barcode.Symbology = Symbology.EAN128;
// set GS1-128/EAN-128 code text to encode
barcode.Code = "Barcode-GS1-128-in-C#";
//draw barcode and save into image file in gif format
barcode.drawBarcode2ImageFile("ean128-in-csharp.gif");
|
2. How to generate GS1-128/EAN-128 barcodes in VB.NET Class?
// construct a linear barcode object
Dim barcode As BusinessRefinery.Barcode.Linear
barcode = New BusinessRefinery.Barcode.Linear()
// set linear barcode symbolgoy to GS1-128/EAN-128
barcode.Symbology = BusinessRefinery.Barcode.Symbology.EAN128
// set GS1-128/EAN-128 code text to encode
barcode.Code = "Barcode-GS1-128-in-VB.NET"
//draw barcode and save into image file in gif format
barcode.drawBarcode2ImageFile("ean128-in-vbnet.gif")
|
3. How to encode Application Identifier (AI) to compatible with GS1 128 in .NET?
You need put parentheses around AI. View the details in the following Java code:
using BusinessRefinery.Barcode;
Linear barcode = new Linear();
barcode.Symbology = Symbology.EAN128;
// The first AI 11 means production date is Jan 01, 2009
// The second AI 13 means packaging date is Feb 01, 2009
barcode.Code("(11)090101(13)090201");
barcode.drawBarcode2ImageFile("ean128-in-csharp.gif");
4. How to draw GS1-128/EAN-128 barcodes to image files (GIF, JPEG, BMP, PNG, & TIFF)?
using BusinessRefinery.Barcode;
Linear barcode = new Linear();
barcode.Symbology = Symbology.EAN128;
barcode.Code = "BarCode GS1-128 in C#";
barcode.drawBarcode2ImageFile("ean128-in-csharp.gif");
You can draw other file formats, by change file types to .jpg, .bmp, .png, and .tif.
5. How to draw & print GS1-128/EAN-128 barcodes to .NET objects like Graphics, Stream, Bitmap?
using BusinessRefinery.Barcode;
Linear barcode = new Linear();
barcode.Symbology = Symbology.EAN128;
barcode.Code = "C# GS1-128 Barcodes";
barcode.drawBarcode2Stream("Stream object");
Bitmap barcodeInBitmap = barcode.drawBarcodeOnBitmap();
barcode.drawBarcodeOnGraphics("Graphics object");
6. How to create UCC/EAN-128 / GS1-128 barcodes in C# or VB.NET Windows Application using .NET Barcode Generator Windows Control Library?
-
add BusinessRefinery.Barcode.Win.dll to your .NET Windows Application project reference
-
add .NET Barcode Generator .NET Windows Control Library to .NET Visual Studio Toolbox
7. How to create UCC/EAN-128 / GS1-128 barcodes in ASP.NET Web Application using ASP.NET Barcode Generator Web Control Library?
-
add BusinessRefinery.Barcode.Web.dll to your ASP.NET project reference
-
add ASP.NET Barcode Generator ASP.NET Web Control Library to .NET Visual Studio Toolbox
Basic
-
Symbology : Barcode symbology type.
HTTP Parameter: symbology;
Default Value: Symbology.CODE128 (7)
-
Code : Barcode encoding data value.
HTTP Parameter: code;
Default Value: ""
-
AddChecksum : Apply Checksum digit at the end of some linear barcode value.
HTTP Parameter: add-checksum;
Default Value: false
Barcode Size
-
BarcodeUnit : Unit of meature for all size related properties. 0: Pixel (default); 1: CM; 2: Inch.
HTTP Parameter: barcode-unit;
Default Value: 0 (UOM_PIXEL)
-
BarWidth : bar module width (X), default is 3 pixel
HTTP Parameter: bar-width;
Default Value: 3
-
BarHeight : bar module height (Y), default is 60 pixel
HTTP Parameter: bar-height;
Default Value: 60
-
LeftMargin : generated barcode image left margin
HTTP Parameter: left-margin;
Default Value: 0.0f
-
RightMargin : generated barcode image right margin
HTTP Parameter: right-margin;
Default Value: 0.0f
-
TopMargin : generated barcode image top margin
HTTP Parameter: top-margin;
Default Value: 0.0f
-
BottomMargin : generated barcode image bottom margin
HTTP Parameter: bottom-margin;
Default Value: 0.0f
-
Resolution : generated barcode image resolution in dpi
HTTP Parameter: resolution;
Default Value: 72 dpi
-
Rotate : barcode rotate angle, valid values: 0 (ROTATE_0), 1 (ROTATE_90), 2 (ROTATE_180), 3 (ROTATE_270)
HTTP Parameter: rotate;
Default Value: 0 (ANGLE_0)
-
BarcodeWidth
HTTP Parameter: barcode-width;
Default Value: 0
-
BarcodeHeight
HTTP Parameter: barcode-height;
Default Value: 0
-
Width : for WinForm Controller only, same as BarcodeWidth
HTTP Parameter: -;
Default Value: 0
-
Height : for WinForm Controller only, same as BarcodeHeight
HTTP Parameter: -;
Default Value: 0
Barcode Text Style
-
DisplayText : set true to draw barcode value text under the barcode
HTTP Parameter: display-text;
Default Value: true
-
DisplayChecksumDigit : set true to display last checksum digit, if any.
HTTP Parameter: display-checksum-digit;
Default Value: true
-
TextFont : drawn barcode value text font style
HTTP Parameter: text-font;
Default Value: new Font("Arial", Font.PLAIN, 11)
-
TextMargin : space between barcode and barcode text
HTTP Parameter: text-margin;
Default Value: 6 pixel
For EAN-128 / GS1-128
-
ProcessTilde : Set true if want to use the tilde character "~" to specify special characters in the input data.
~NNN: is used to represent the ASCII character with the value of NNN. NNN is from 000 - 255.
HTTP Parameter: process-tilde;
Default Value: false
-
ECI
HTTP Parameter: eci;
Default Value: 3 (ECI.ECI_DEFAULT)
-
FNC1Mode
HTTP Parameter: fnc1-mode;
Default Value: 0 (FNC1_NONE)
-
AI
HTTP Parameter: ai;
Default Value: 0
|