Generating a GS1-128 (formerly EAN-128) barcode using ZXing

5.5k views Asked by At

I'm using the ZXing API in my application and have just discovered that it doesn't appear to support the EAN-128 barcode format. It supports Code 128 but there are subtle differences in the barcode image between EAN-128 and Code 128.

Does anyone know of a workaround in ZXing that will generate an EAN-128 barcode?

If not, is there any other barcode generation API's out there that I can package with Android?

2

There are 2 answers

1
BrentM On

On the ZXing GitHub project it references a related project that is an open source Java barcode generator which supports EAN-128/GS1-128.

http://barcode4j.sourceforge.net/

While I have not used this project, it might be worth investigating if you cannot find a workaround with ZXing.

0
Terry Burton On

ZXing does support GS1-128 (formerly called EAN-128) but requires a little work on the part of the user to supply the data in the correct format.

GS1-128 is a GS1-specified application standard of the parent Code 128 symbology and as such uses a Code 128 symbol with data supplied in GS1 Application Identifier standard format.

The following answer provides more detail about what this means in practise and links to information that describes how to format the data according to this standard so that it can be supplied to ZXing's Code 128 encoder:

https://stackoverflow.com/a/34427810/2568535