Aspose::BarCode::ComplexBarcode::HIBCLICPrimaryDataCodetext class

HIBCLICPrimaryDataCodetext class

Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary data.

class HIBCLICPrimaryDataCodetext : public Aspose::BarCode::ComplexBarcode::HIBCLICComplexCodetext

Methods

MethodDescription
Equals(System::SharedPtr<System::Object>) overrideReturns a value indicating whether this instance is equal to a specified HIBCLICPrimaryDataCodetext value.
get_BarcodeType()Gets barcode type. HIBC LIC codetext can be encoded using HIBCCode39LIC, HIBCCode128LIC, HIBCAztecLIC, HIBCDataMatrixLIC and HIBCQRLIC encode types. Default value: HIBCCode39LIC.
get_Data()Identifies primary data.
GetBarcodeType() overrideGets barcode type.
GetConstructedCodetext() overrideConstructs codetext.
GetHashCode() const overrideReturns the hash code for this instance.
HIBCLICComplexCodetext()
HIBCLICPrimaryDataCodetext()
InitFromString(System::String) overrideInitializes instance from constructed codetext.
set_BarcodeType(System::SharedPtr<Aspose::BarCode::Generation::BaseEncodeType>)Sets barcode type. HIBC LIC codetext can be encoded using HIBCCode39LIC, HIBCCode128LIC, HIBCAztecLIC, HIBCDataMatrixLIC and HIBCQRLIC encode types. Default value: HIBCCode39LIC.
set_Data(System::SharedPtr<PrimaryData>)Identifies primary data.

Remarks

This sample shows how to encode and decode HIBC LIC using HIBCLICPrimaryCodetext.

[C#]
HIBCLICPrimaryCodetext complexCodetext  = new HIBCLICPrimaryCodetext();
complexCodetext.BarcodeType = EncodeTypes.HIBCQRLIC;
complexCodetext.Data = new PrimaryData();
complexCodetext.Data.ProductOrCatalogNumber = "12345";
complexCodetext.Data.LabelerIdentificationCode = "A999";
complexCodetext.Data.UnitOfMeasureID = 1;
using (ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(complexCodetext))
{
    Bitmap image = generator.GenerateBarCodeImage();
    using (BarCodeReader reader = new BarCodeReader(image, DecodeType.HIBCQRLIC))
    {
        reader.ReadBarCodes();
        string codetext = reader.FoundBarCodes[0].CodeText;
        HIBCLICPrimaryCodetext result = (HIBCLICPrimaryCodetext)ComplexCodetextReader.TryDecodeHIBCLIC(codetext);
        Console.WriteLine("Product or catalog number: " + result.Data.ProductOrCatalogNumber);
        Console.WriteLine("Labeler identification code: " + result.Data.LabelerIdentificationCode);
        Console.WriteLine("Unit of measure ID: " + result.Data.UnitOfMeasureID);
    }
}

See Also