Free Support Forum - aspose.com

GS_1_CODE_128 is not supported in latest API for JAVA

Hello All,

I am evaluating the developer OEM version. it seems to me the GS1-128 is not supported by API now. but from the previous post and developer guide this symbology is supposed to be valid.

I am using the below code. but the API return with “class com.aspose.barcode.BarCodeException: Wrong format of GS1 Code128 input string”

Thank you in advance for your help.


try {
String GTIN1 = “(00)350123451234567894”;
BarCodeBuilder builder = new BarCodeBuilder(GTIN1, EncodeTypes.GS_1_CODE_128);
builder.save(“Gs1128-” + GTIN1+ “.svg”, BarCodeImageFormat.Svg);
}
catch(Throwable e) {
e.printStackTrace();
}

Maven :slight_smile:

com.aspose aspose-barcode 18.2

@justinwang191,

GS1-128 barcode format is supported by Aspose.BarCode. The exception thrown is the default behavior of the API. It is thrown due to incorrect input code text string.

Aspose.BarCode generates AI (Application Identifier) compliance GS1 coded barcode. Checksum calculation and validation for many AI specifications have been implemented. As an example, consider code text “(703)123”, this is an incorrect code text (ref: 703 AI, with letters – 324a, with more than 4 symbols). Aspose.BarCode will generates exception if user tries to generate the barcode with EncodeTypes as GS1Code128. The following exception message will be displayed for such an incorrect barcode.

Exception Message:

Wrong format of GS1 Code128 input string.

Thank you so much for the help. however I tried other 14 digtis GTIN. the exception still thrown.

Do you know any barcode I can use to get ride ot the exception? after the 128 code generated successfully we pretty much to purchase the API.

Many Thanks

THANK YOU.

it is working well for the GTIN - (01)95012345678903 . awesome :slight_smile:

Regards,

@justinwang191,

You are welcome. It is good to know that things are working at your end. Thank you for update. See you on board soon.

Can I ask one more question? Does the barcode API support EPS as image format?

Thank you in advance for the information.

Regards,

@justinwang191,

This is to update you that the EPS image format is not supported. The issue has been logged into our system with ID BARCODEJAVA-65 for further investigation. We will update you here once there is some information or a fix version available in this regard.

@justinwang191,

Further to update you that implementation of EPS image format feature will take time. In the mean while you may try vector formats as a workaround. Two new properties Emf and Svg has been introduced in com.aspose.barcode.BarCodeImageFormat class which can be set before saving barcode image. How to save barcode image in vector format is quite simple. Code snippet is given below for your reference.

CODE:

// Instantiate BarCodeBuilder object
com.aspose.barcode.BarCodeBuilder builder = new com.aspose.barcode.BarCodeBuilder();

// Set the Code text for the barcode
builder.setCodeText("ABCDEFGHIJKLMNOPQRSTUVWXYZ");

// Set the symbology type to QR
builder.setEncodeType(com.aspose.barcode.EncodeTypes.QR);

// Save the image
builder.save("qr_test.emf", com.aspose.barcode.BarCodeImageFormat.Emf);

Thank you very much for the update.

We can download the SVG format already. The team is still waiting for the EPS so we can place a finial order.

Thanks,

@justinwang191,

This is to update you that implementation of this feature will take time. ETA for feature is in the start of 3rd quarter of 2018. We will update you here as soon as there is some information or a fix version available in this regard.

Thanks you for the update

@justinwang191,

You are welcome.

Hi Ikram,

Do you have a production date for the EPS format release? I need to update the team accordingly.

Thanks,

@justinwang191,

We are looking into it. We will update you soon. Currently no reliable ETA is available.

Hi Ikram,

Sorry to bother you again. Just wondering if the full AI are supported for GS1-128 barcode ? for example i want to print (01)10777077700030(30)19(21)123456789012 / or (01)10777077700030(11)180601(13)180609(15)181212(17)191212.

I only see the last segment on the image like (17)191212.

Thanks

		String gtin1 = "(420)94901(92)02090107615900001236";

		BarCodeBuilder builder = new BarCodeBuilder(gtin1, EncodeTypes.GS_1_CODE_128);
		builder.setAutoSize(true);

		builder.save("c:\\temp\\Gs1128-" + gtin1+ ".svg", BarCodeImageFormat.Svg);

@justinwang191,

Thank you for details. We have investigated the issue at our end. Initial investigation shows that the issue persists. The issue has been logged into our system with ID BARCODEJAVA-518. We will update you here once there is some information or a fix version available in this regard.

Thank you for the update. sadly it is a show stopper for the whole processing.

Regards,

@justinwang191,

We surly will update you as soon as any update or a fix is available. We are sorry for the inconvenience.

Thank you so much! it is really helpful!!!