Browse our Products

Aspose.BarCode for .NET 24.8 Release Notes

All Changes

KeySummaryCategory
BARCODENET-38022AustralianPostShortBarHeight is ignoredBug + Enhancement + Reopened
BARCODENET-38369Update PZN encoder, decoderEnhancement
BARCODENET-39081Add tests for functionality that was added in release 24.6 including setters and gettersQuality issue
BARCODENET-39089Recognize and add QrVersion to QRExtendedParameters in BarCodeResultEnhancement
BARCODENET-39102Fix issue with failed meterеd testsQuality issue

Public API changes and backwards compatibility

AustraliaPost, Planet, Postnet barcodes generation

AustraliaPost, Planet, Postnet barcodes generation is changed.

AustralianPost.AustralianPostShortBarHeight by default is set to zero and calculated by default as 0.26 from BarHeight.

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

Postal.PostalShortBarHeight by default is set to zero and calculated by default as 0.5 from BarHeight.

//Planet, Postnet barcodes generation
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.Postnet, "5552357000");
gen.Parameters.Barcode.BarHeight.Pixels = 100;

// If short bar is not specified, it is scaled to 0.5 * BarHeight
gen.Parameters.Barcode.Postal.PostalShortBarHeight.Pixels = 40;

gen.Parameters.Barcode.CodeTextParameters.Location = CodeLocation.None;
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;

PZN7 and PZN8 barcodes generation

PZN8 and PZN7 encoding and decoding are supported:

  • To encode PZN7 it is needed to provide 6 digits or less to CodeText, like “123456”.
  • To encode PZN8 it is needed to provide 7 digits or more to CodeText, like “1234567”.
  • Provided last checksum digit is ignored and generated by the barcode engine.
//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);

QR, MicroQR, RectMicroQR barcodes recognition

QR, MicroQR, RectMicroQR barcodes recognition parameters obtained new public properties QRVersion, MicroQRVersion, RectMicroQRVersion and QRErrorLevel, which have been added to the QRExtendedParameters.

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

Result:

Codetext: Aspose
QR version: Version15
Error level: LevelM