Aspose.BarCode for .NET 24.8 (MSI installer) delivers a powerful update for developers working with barcodes in their .NET applications (C#, VB.NET). This release expands barcode generation and recognition capabilities on the Windows platform.
Generate PZN7 and PZN8 Barcodes
Seamlessly encode and decode PZN barcodes for pharmaceutical applications using the latest version of the C# barcode processing library. The following code sample shows PZN7 barcode encoding and decoding in C#.
//encode and decode PZN7
using (BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.PZN, "123456"))
using (BarCodeReader reader = new BarCodeReader(gen.GenerateBarCodeImage(), DecodeType.PZN))
foreach (BarCodeResult result in reader.ReadBarCodes())
Console.WriteLine(result.CodeTypeName + ":" + result.CodeText);
//encode and decode PZN8
using (BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.PZN, "1234567"))
using (BarCodeReader reader = new BarCodeReader(gen.GenerateBarCodeImage(), DecodeType.PZN))
foreach (BarCodeResult result in reader.ReadBarCodes())
Console.WriteLine(result.CodeTypeName + ":" + result.CodeText);
Source*
Enhanced QR Recognition
You can now extract QR version and error level information during barcode recognition in your C# and VB.NET barcode apps, as showcased in this code example.
using (BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.QR, "Aspose"))
{
gen.Parameters.Barcode.QR.QrVersion = QRVersion.Version15;
gen.Parameters.Barcode.QR.QrErrorLevel= QRErrorLevel.LevelM;
using (BarCodeReader reader = new BarCodeReader(gen.GenerateBarCodeImage(), DecodeType.QR))
{
reader.ReadBarCodes();
Console.WriteLine("Codetext: {0}", reader.FoundBarCodes[0].CodeText);
Console.WriteLine("QR version: {0}", reader.FoundBarCodes[0].Extended.QR.QRVersion);
Console.WriteLine("Error level: {0}", reader.FoundBarCodes[0].Extended.QR.QRErrorLevel);
}
}
Source*
Streamline Australia Post, Planet, and Postnet Barcodes in .NET
With Aspose.BarCode for .NET 24.8, you can generate Australia Post, Planet, and Postnet barcodes with improved accuracy and control over short bar height. This sample code illustrates AustralianPost.AustralianPostShortBarHeight
default calculation.
//AustraliaPost barcode generation
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.AustraliaPost, "6212345678AP");
gen.Parameters.Barcode.AustralianPost.AustralianPostEncodingTable = CustomerInformationInterpretingType.CTable;
gen.Parameters.Barcode.BarHeight.Pixels = 100;
// If short bar is not specified, it is scaled to 0.26 * BarHeight
gen.Parameters.Barcode.AustralianPost.AustralianPostShortBarHeight.Pixels = 10;
gen.Parameters.Barcode.Padding.Left.Pixels = 10;
gen.Parameters.Barcode.Padding.Top.Pixels = 10;
gen.Parameters.Barcode.Padding.Right.Pixels = 10;
gen.Parameters.Barcode.Padding.Bottom.Pixels = 10;
gen.Save("AustraliaPost.png", BarCodeImageFormat.Png);
Source*
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.BarCode for .NET 24.8 Release Notes.