Link Search Menu Expand Document

Read Checkboxes From Image - VB.NET

BarCode Reader SDK sample in VB.NET demonstrating ‘Read Checkboxes From Image’

Imports System.IO
Imports Bytescout.BarCodeReader

Module Module1

    Sub Main()

        Dim ImageFile As String = "checkboxes-checked.png"

        Console.WriteLine("Reading checkboxes from image {0}", Path.GetFullPath(ImageFile))

        Dim reader As New Reader()
        reader.RegistrationName = "demo"
        reader.RegistrationKey = "demo"

        ' Enable check boxes recognition
        reader.BarcodeTypesToFind.Checkbox = True

        ' -----------------------------------------------------------------------
        ' NOTE: We can read barcodes from specific page to increase performance .
        ' For sample please refer to "Decoding barcodes from PDF by pages" program.
        ' ----------------------------------------------------------------------- 

        ' Find check boxes
        Dim barcodes = reader.ReadFrom(ImageFile)

        For Each barcode As FoundBarcode In barcodes
            Console.WriteLine("Found checkbox with type '{0}' and value '{1}'", barcode.Type, barcode.Value)

        ' Cleanup

        Console.WriteLine("Press any key to exit..")

    End Sub

End Module

Download Source Code (.zip)

Return to the previous page Explore BarCode Reader SDK