Creating GS1-128 barcode with zxing

178 views
Skip to first unread message

Chris Engert

unread,
Jun 14, 2017, 7:56:42 AM6/14/17
to zxing
Hi all,

I have a question regarding creating a GS1-128 barcode with zxing. Our AI is 8018. When using 8018nnnnnnnnnnnnnnnnnn, the barcode format is code128. How can I tell zxing about the FNC1?

Thanks
Chris

zxingnet

unread,
Jun 15, 2017, 12:54:54 AM6/15/17
to zxing
You have to use the special character '\u00f1' at the beginning of your content. If you have variable length element strings within your content you have to use the same character to separate the elements from each other.

Ben Mead

unread,
Aug 1, 2017, 3:07:07 PM8/1/17
to zxing
Is there any special mode that has to be set to encode the \u00f1? I have a front end to zxing that encodes that as 6 characters instead of as an FNC1...

zxingnet

unread,
Aug 3, 2017, 5:05:17 AM8/3/17
to zxing
On Tuesday, August 1, 2017 at 9:07:07 PM UTC+2, Ben Mead wrote:
> Is there any special mode that has to be set to encode the \u00f1? I have a front end to zxing that encodes that as 6 characters instead of as an FNC1...

No special mode. Can you show the source code which you have tried? And the resulting barcode image?

girish meena

unread,
Sep 6, 2017, 9:43:45 AM9/6/17
to zxing
On Thursday, June 15, 2017 at 10:24:54 AM UTC+5:30, zxingnet wrote:
> You have to use the special character '\u00f1' at the beginning of your content. If you have variable length element strings within your content you have to use the same character to separate the elements from each other.

I am using \u00f101008082320008321717090610EYS19F as content and below is my code.
BarcodeWriter barCodeWriter = new BarcodeWriter
{
Format = BarcodeFormat.CODE_128,
Options = new QrCodeEncodingOptions
{
Height = 140,
Width = 70
},
};

Bitmap b =
barCodeWriter.Write("\u00f101008082320008321717090610EYS19F");
ImageConverter img = new ImageConverter();
byte[] imagByte = (byte[])img.ConvertTo(b, typeof(byte[]));
Product.ImgBarcode = imagByte;
return this.View(Product);

But I am not able to read the barcode from GS1-128 decoder Android mobile app.

Any help will be appreciated.
Regards

girish meena

unread,
Sep 6, 2017, 9:47:41 AM9/6/17
to zxing
On Thursday, June 15, 2017 at 10:24:54 AM UTC+5:30, zxingnet wrote:
> You have to use the special character '\u00f1' at the beginning of your content. If you have variable length element strings within your content you have to use the same character to separate the elements from each other.

Similarly if I use \u001d01008082320008321717090610EYS19F it shows me exception "bad charcter in input: \u001d"

Reply all
Reply to author
Forward
0 new messages