Browse our Products
Aspose.BarCode for Cpp 24.8 Release Notes
This page contains release notes information for Aspose.BarCode for C++ 24.8.
Please also check CodePorting.Native Cs2Cpp 24.8 release notes.
Please also check CodePorting.Native Cs2Cpp 24.8 release notes.
All Changes
Key | Summary | Category |
---|---|---|
BARCODENET-38022 | AustralianPostShortBarHeight is ignored | Bug |
BARCODENET-38369 | Update PZN encoder, decoder | Enhancement |
BARCODENET-39089 | Recognize and add QrVersion to QRExtendedParameters in BarCodeResult | Enhancement |
Public API changes and backwards compatibility
AustraliaPost, Planet, Postnet barcodes generation
AustraliaPost, Planet, Postnet barcodes generation is changed.
AustralianPost::AustralianPostShortBarHeight calculated by default as 0.26 from BarHeight.
//AustraliaPost barcode generation
System::SharedPtr<BarcodeGenerator> gen = System::MakeObject<BarcodeGenerator>(EncodeTypes::AustraliaPost, u"6212345678AP");
gen->get_Parameters()->get_Barcode()->get_AustralianPost()->set_AustralianPostEncodingTable(Aspose::BarCode::CustomerInformationInterpretingType::CTable);
gen->get_Parameters()->get_Barcode()->get_BarHeight()->set_Pixels(100.0f);
// If short bar is not specified, it is scaled to 0.26 * BarHeight
gen->get_Parameters()->get_Barcode()->get_AustralianPost()->get_AustralianPostShortBarHeight()->set_Pixels(10.0f);
gen->get_Parameters()->get_Barcode()->get_Padding()->get_Left()->set_Pixels(10.0f);
gen->get_Parameters()->get_Barcode()->get_Padding()->get_Top()->set_Pixels(10.0f);
gen->get_Parameters()->get_Barcode()->get_Padding()->get_Right()->set_Pixels(10.0f);
gen->get_Parameters()->get_Barcode()->get_Padding()->get_Bottom()->set_Pixels(10.0f);
gen->Save(u"AustraliaPost.png", BarCodeImageFormat::Png);
Postal::PostalShortBarHeight calculated by default as 0.5 from BarHeight.
//Planet, Postnet barcodes generation
System::SharedPtr<BarcodeGenerator> gen = System::MakeObject<BarcodeGenerator>(EncodeTypes::Postnet, u"5552357000");
gen->get_Parameters()->get_Barcode()->get_BarHeight()->set_Pixels(100.0f);
// If short bar is not specified, it is scaled to 0.5 * BarHeight
gen->get_Parameters()->get_Barcode()->get_Postal()->get_PostalShortBarHeight()->set_Pixels(40.0f);
gen->get_Parameters()->get_Barcode()->get_CodeTextParameters()->set_Location(CodeLocation::None);
gen->get_Parameters()->get_Barcode()->get_Padding()->get_Left()->set_Pixels(10.0f);
gen->get_Parameters()->get_Barcode()->get_Padding()->get_Top()->set_Pixels(10.0f);
gen->get_Parameters()->get_Barcode()->get_Padding()->get_Right()->set_Pixels(10.0f);
gen->get_Parameters()->get_Barcode()->get_Padding()->get_Bottom()->set_Pixels(10.0f);
PZN7 and PZN8 barcodes generation
Support for PZN8 and PZN7 encoding and decoding has been added:
- To encode PZN7, provide 6 digits or fewer in the CodeText, such as “123456.”
- To encode PZN8, provide 7 digits or more in the CodeText, such as “1234567.”
- The provided checksum digit will be ignored and automatically generated by the barcode engine.
//encode and decode PZN7
System::SharedPtr<BarcodeGenerator> gen = System::MakeObject<BarcodeGenerator>(EncodeTypes::PZN, u"123456");
System::SharedPtr<BarCodeReader> reader = System::MakeObject<BarCodeReader>(gen->GenerateBarCodeImage(), DecodeType::PZN);
for (System::SharedPtr<BarCodeResult> result : reader->ReadBarCodes())
{
System::Console::WriteLine(result->get_CodeTypeName() + u":" + result->get_CodeText());
}
//encode and decode PZN8
System::SharedPtr<BarcodeGenerator> gen = System::MakeObject<BarcodeGenerator>(EncodeTypes::PZN, u"1234567");
System::SharedPtr<BarCodeReader> reader = System::MakeObject<BarCodeReader>(gen->GenerateBarCodeImage(), DecodeType::PZN);
for (System::SharedPtr<BarCodeResult> result : reader->ReadBarCodes())
{
System::Console::WriteLine(result->get_CodeTypeName() + u":" + result->get_CodeText());
}
QR, MicroQR, RectMicroQR barcodes recognition
New public properties, QRVersion, MicroQRVersion, RectMicroQRVersion, and QRErrorLevel, have been added to the QRExtendedParameters for QR, MicroQR, and RectMicroQR barcode recognition parameters.
System::SharedPtr<BarcodeGenerator> gen = System::MakeObject<BarcodeGenerator>(EncodeTypes::QR, u"Aspose");
gen->get_Parameters()->get_Barcode()->get_QR()->set_QrVersion(QRVersion::Version15);
gen->get_Parameters()->get_Barcode()->get_QR()->set_QrErrorLevel(QRErrorLevel::LevelM);
System::SharedPtr<BarCodeReader> reader = System::MakeObject<BarCodeReader>(gen->GenerateBarCodeImage(), DecodeType::QR);
reader->ReadBarCodes();
System::Console::WriteLine(u"Codetext: {0}", reader->get_FoundBarCodes()[0]->get_CodeText());
System::Console::WriteLine(u"QR version: {0}", reader->get_FoundBarCodes()[0]->get_Extended()->get_QR()->get_QRVersion());
System::Console::WriteLine(u"Error level: {0}", reader->get_FoundBarCodes()[0]->get_Extended()->get_QR()->get_QRErrorLevel());
Result:
Codetext: Aspose
QR version: Version15
Error level: LevelM