Question

38
Views
SatishKumar Tanappa (Satish)
Rabobank
Senior Developer
Rabobank
AU
Satish Member since 2012 18 posts
Rabobank
Posted: February 9, 2021
Last activity: February 10, 2021
Posted: 9 Feb 2021 17:15 EST
Last activity: 10 Feb 2021 5:00 EST

Generate 1D barcode according GS1 format.

Hello Team,

 

We are using Google Zxing library to generate barcode. The barcodes are generating fine but we couldn't include  FNC1 (hidden character) to make to GS1 required format. 

 

The below is the code,

com.google.zxing.oned.Code128Writer writer = new com.google.zxing.oned.Code128Writer(); com.google.zxing.common.BitMatrix matrix = null;

try  {    matrix = writer.encode(qrtext, com.google.zxing.BarcodeFormat.CODE_128, width, height); }

catch (com.google.zxing.WriterException e) { throw new PRRuntimeException(e); }

java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(width, height, java.awt.image.BufferedImage.TYPE_INT_RGB);

image.createGraphics();

 

The image object will be converted into png type and will be uploaded in the image content rule.

 

Can you please share the details if any one generating barcode according GS1 format by using Google Zxing or any other open source library?

 

Thanks in advance.

Regards,

Satish

***Edited by Moderator: Pooja Gadige to add platform capability tags***
Pega Platform 7.4 User Experience Mobile Low-Code App Development