Ikram ul Haq October 28, 20152 Comments

Generate UTF-8 Encoded DataMatrix Barcode using Aspose.BarCode for Java 7.3.0

Generate UTF-8 Encoded DataMatrix Barcode using Aspose.BarCode for Java 7.3.0

October 28, 2015
Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.BarCode for Java logo We are pleased to announce the release of Aspose.BarCode for Java 7.3.0. This release supports generating DataMatrix Barcode that is UTF-8 encoded.

How to create UTF-8 Encoded Datamatrix Barcode

DataMatrix is used to encode product and serial number information on electrical rating plates, to identify lenses, circuit boards and other items during manufacturing. DataMatrix barcodes can store up to 2000 characters. It is sometimes required that Barcode generated should be in UTF-8 Format.

Following is the simple code snippet demonstrating how to generate UTF-8 encoded DataMatrix barcode.


// Create instance of BarcodeBuilder class.
BarCodeBuilder objBuilder = new BarCodeBuilder();

// Set the Barcode symbology to DataMatrix.
objBuilder.setSymbologyType(Symbology.DataMatrix);

// Set the Encoding mode of DataMatix barcode to Custom mode.
objBuilder.setDataMatrixEncodeMode(DataMatrixEncodeMode.Custom);

// Set the Barcode Text encoding mode to UTF-8.
objBuilder.setCodeTextEncoding(Charset.forName("UTF-8"));

// set the Barcode text value.
objBuilder.setCodeText("öäüéà è");

// Save the Barcode image.
objBuilder.Save("test_output_Utf8.bmp", BarCodeImageFormat.Bmp);

Please review the release notes of Aspose.BarCode for Java 7.3.0 for a complete list of enhancements.

Aspose.BarCode for Java Resources

The resources you may need to accomplish your tasks:

Join the Conversation

2 Comments

Leave a comment

Posted inAspose.BarCode Product Family
 

Related Articles