We are pleased to announce the release of Aspose.Barcode for Java 17.7. The major development in this release is the support to get the minimum height & width required for a barcode image. Functionality of GetOnlyBarCodeImage method has also been improved in this release.
Find Out Minimum BarCode Height & Width
Aspose.BarCode now supports the functionality to get the minimum height & width required for a barcode image to be generated. How to know the minimum required size (height & width) for a barcode image is very simple and is demonstrated in the code snippet given below.
// Create an instance of BarCodeBuilder class // Set barcode text // Set encoding type com.aspose.barcode.BarCodeBuilder builder = new com.aspose.barcode.BarCodeBuilder("1234567890", com.aspose.barcode.EncodeTypes.CODE_128); // Set graphic unit builder.setGraphicsUnit(com.aspose.barcode.GraphicsUnit.Pixel); // Call GetMinimumBarCodeSize method to get the minimum size required java.awt.geom.Dimension2D minSize = builder.getMinimumBarCodeSize(); // Set Auto size to false builder.setAutoSize(false); // Set image height & width with the help of min size got from GetMinimumBarCodeSize method builder.setImageWidth((float) minSize.getWidth()); builder.setImageHeight((float)minSize.getHeight()); // Save the barcode image javax.imageio.ImageIO.write( builder.getBarCodeImage(), "PNG", new java.io.File("minimumresult.png") );
Complete list of enhancements in this release is as follows.
- Functionality to print barcode has been improved. The working has been enhanced in such a way that barcode lines are now smooth when printing the barcode on a label printer.
- Functionality of GetOnlyBarCodeImage method has been improved. The working of GetOnlyBarCodeImage method with small size has been enhanced.
To view a complete list of new features, fixes and to download the latest release, please visit Aspose.Barcode for Java 17.7 page in downloads section.
Aspose.BarCode for Java Resources
The following API resources can be of help to you in getting started with Aspose.BarCode:
Aspose.BarCode for Java Wiki docs – help documentation and API reference documents.
Aspose.BarCode Product Family Forum – post your technical questions and queries, or any other problem you faced while running Aspose.BarCode APIs.
Enable Email Subscription – Don’t limit yourself, you can keep yourself updated with the latest news on Aspose.BarCode APIs and new features, fixes, plus other API related topics by subscribing to Aspose.BarCode blog.
Aspose.BarCode for Java Examples – We have published our code examples on the social coding website GitHub.com. Anyone could explore the code examples for learning purposes.