Aztec Barcode With Binary Data | VB.NETByteScout Barcode SDK

Aztec Barcode With Binary Data | VB.NET


Imports System.Diagnostics
Imports System.Text
Imports Bytescout.BarCode

Class Program
    Friend Shared Sub Main(args As String())
        ' Create Barcode component instance
        Using barcode As New Barcode()
            barcode.RegistrationName = "demo"
            barcode.RegistrationKey = "demo"

            ' Set barcode type
            barcode.Symbology = SymbologyType.Aztec
            ' Force binary mode
            barcode.Options.AztecCompactionMode = AztecCompactionMode.Binary

            ' Sample byte array to use as value  
            Dim byteArray As Byte() = New Byte() {0, 10, 11, 12, 13, 14, _
                15, &Hff}

            ' Set value by converting byte array to string  
            barcode.Value = Encoding.[Default].GetString(byteArray)

            ' Save barcode image

            ' Open output image in default associated application
        End Using
    End Sub
End Class