Aspose.BarCode for Java

Aspose.BarCode for Java 18.1 is available for download now. The major development in this release is the support to save the generated barcode image in Vector format. This release also supports the enhanced process of drawing barcode text when the font is specified in the code snippet. The enhanced working of CodeLocation property has also been incorporated in this release.

Generating Barcode Image In Vector Format

Aspose.BarCode for Java now supports the functionality to generate barcode images in vector format. Two new properties Emf and Svg have been introduced in com.aspose.barcode.BarCodeImageFormat class which can be set before saving barcode image. How a developer can save barcode image in vector format is quite simple and is demonstrated in the code snippet given below. The code snippet contains comments that make it self explanatory.

 // 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); 

Other Improvements

Following is the list of improvements made in this release and bug fixes that were reported by our valued customers.

  • Process of setting license has been improved. Now API will show correct exception message in case license subscription is expired. Set license execution time has also been improved.
  • Inaccurate barcode text was displayed when font is specified while saving the barcode image in vector format. The enhancement has been made to draw barcode text properly.
  • Setting big text size with com.aspose.barcode.StringAlignment.Far option, it was noticed that the barcode text disappears. Now the issue has been fixed.
  • Working of setCodeLocation property has been improved.

To view a complete list of enhancements and fixes, please visit the release notes page.

Aspose.BarCode for Java Resources

The following API resources can be of help to you in getting started with Aspose.BarCode: