- Barcode Products
-
Guide
- Generate barcodes in ASP.NET
- Generate barcodes in .NET WinForms
- Generate barcodes in Visual C#.NET
- Generate barcodes in Visual Basic.NET
- Generate barcodes in Java
- Generate barcodes in Crystal Reports
- Generate barcodes in Reporting Service
- Generate barcodes in RDLC Report
- Generate Barcodes in BIRT Report
- Integration
- Knowledge
- Order Now
- About Us
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. GS1-128 is also called EAN-128, UCC-128, USS-128, GS1 128, UCC.EAN-128, GTIN-128, UCC-12, EAN/UCC-13, EAN/UCC-14.
Java Barcode EAN-128 / GS1-128 Generator 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
Java EAN-128 / GS1-128 Barcode Generator - Common Questions
1. How to generate EAN-128 / GS1-128 barcodes in JSP & HTML pages?
- Copy "barcoding" folder contents to your Java Servlet container like Tomcat or JBoss's applications folder
- Restart your Java Servlet container
- Open your web browser like IE, Firefox, and navigate to http://localhost:8080/barcoding/linear?DATA=(11)090101&TYPE=15
-
To generate barcode images in JSP or HTML pages, insert the following html img tag code:
<img src="http://localhost:8080/barcoding/linear?DATA=(11)090101&TYPE=15" border=0 />
2. How to create EAN-128 / GS1-128 barcodes in Java Servlet?
try { Barcode barcode = new Barcode(); barcode.setSymbology(Barcode.EAN128); barcode.setCode("(11)090101"); response.setContentType("image/jpeg"); response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0); ServletOutputStream servletoutputstream = response.getOutputStream(); barcode.drawOnStream(servletoutputstream); } catch (Exception e) { throw new ServletException(e); }
3. How to encode Application Identifier (AI) to compatible with GS1 128 in Java Class?
You need put parentheses around AIs. View the details in the following Java code:Barcode barcode = new Barcode(); barcode.setSymbology(Barcode.EAN128); // The first AI 11 means production date is Jan 01, 2009 // The second AI 13 means packaging date is Feb 01, 2009 barcode.setCode("(11)090101(13)090201"); barcode.drawImage2File("C://ean128.gif");
4. How to generate EAN-128 / GS1-128 barcodes in Java Class?
Barcode barcode = new Barcode(); barcode.setSymbology(Barcode.EAN128); barcode.setCode("(11)090101"); barcode.drawImage2File("C://ean128.gif");
5. How to draw EAN-128 / GS1-128 barcodes to image files?
Barcode barcode = new Barcode(); barcode.setSymbology(Barcode.EAN128); barcode.setCode("(11)090101"); barcode.drawImage2File("C://ean128.gif");
6. How to draw & print EAN-128 / GS1-128 barcodes to Java image objects or stream objects?
Barcode barcode = new Barcode(); barcode.setSymbology(Barcode.EAN128); barcode.setCode("(11)090101"); barcode.drawOnGraphics("Graphics2D object"); barcode.drawOnStream("OutputStream object");
Java Barcode EAN-128 / GS1-128 Generator - Barcode Property Settings
Basic
-
symbology : Barcode symbology type.
Servlet Parameter: symbology; Default Value: Barcode.CODE128 (11)
-
code : Barcode encoding data value.
Servlet Parameter: code; Default Value: ""
-
supplementCode : 2 or 5 digits Barcode supplement data for EAN-8, EAN-13, UPC-A, UPC-E, ISBN, ISSN only.
Servlet Parameter: supplement-code; Default Value: ""
-
addChecksum : Apply Checksum digit at the end of some linear barcode value.
Servlet Parameter: add-checksum; Default Value: false
-
barcodeUnit : Unit of meature for all size related properties. 0: Pixel (default); 1: CM; 2: Inch.
Servlet Parameter: barcode-unit; Default Value: 0 (UOM_PIXEL)
-
barWidth : bar module width, default is 3 pixel
Servlet Parameter: bar-width; Default Value: 3
-
barHeight : bar module height, default is 60 pixel
Servlet Parameter: bar-height; Default Value: 60
-
leftMargin : generated barcode image left margin
Servlet Parameter: left-margin; Default Value: 0.0f
-
rightMargin : generated barcode image right margin
Servlet Parameter: right-margin; Default Value: 0.0f
-
topMargin : generated barcode image top margin
Servlet Parameter: top-margin; Default Value: 0.0f
-
bottomMargin : generated barcode image bottom margin
Servlet Parameter: bottom-margin; Default Value: 0.0f
-
resolution : generated barcode image resolution in dpi
Servlet Parameter: resolution; Default Value: 72 dpi
-
rotate : barcode rotate angle, valid values: 0 (ROTATE_0), 1 (ROTATE_90), 2 (ROTATE_180), 3 (ROTATE_270)
Servlet Parameter: rotate; Default Value: 0 (ANGLE_0)
-
barcodeWidth
Servlet Parameter: barcode-width; Default Value: 0
-
barcodeHeight
Servlet Parameter: barcode-height; Default Value: 0
-
displayText : set true to draw barcode value text under the barcode
Servlet Parameter: display-text; Default Value: true
-
textFont : drawn barcode value text font style
Servlet Parameter: text-font; Default Value: new Font("Arial", Font.PLAIN, 11)
-
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.
Servlet Parameter: process-tilde; Default Value: false
-
eci
Servlet Parameter: eci; Default Value: 3 (ECI_DEFAULT)
-
fnc1Mode
Servlet Parameter: fnc1-mode; Default Value: 0 (FNC1_NONE)
-
ai
Servlet Parameter: ai; Default Value: 0
Java Barcode Generator Supporting Barcode Symbology Types
-
Linear Barcodes
- Codabar - Code-11 - Code-39 - Code-93 - Code-128 - EAN-128 / GS1-128 - Code 2 of 5 - Interleaved 2 of 5 - UPC-A - UPC-E - EAN-8 - EAN-13 - GS1 DataBar - ISBN - ISSN - Identcode - Leitcode - Planet - Postnet - USPS Intelligent Mail Barcode (Onecode) - MSI Plessey - RM4SCC - ITF-14 -
Data Matrix - Data Matrix with ECC200, ASCII, text, C40 and Base256 encoding, Extended Channel Interpretation and Structured append.
-
PDF-417 - PDF417 with EC levels 1 to 8, text and binary encoding.
-
QR-Code - QRCode with structured append, UPS encoding and mode 2-6 support.