void ReadBarcodes2DFirstNext(string imageFile)
{
// Create objects and open input images
CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer();
CiBarcode Barcode;
CiPdf417 reader = ci.CreatePdf417(); // To read PDF416 barcodes
// CiDataMatrix reader = ci.CreateDataMatrix(); // To read DataMatrix barcodes
// CiQR reader = ci.CreateQR(); // To read QR barcodes
reader.Image.Open(imageFile, 1);
// Configure reader
// reader.Directions = FBarcodeDirections.cibHorz; // Limit barcode search direction (Faster processing)
Barcode = reader.FirstBarcode();
while (Barcode != null)
{
Console.WriteLine(Barcode.Text);
// if (barcodeFound) break Exit For ' End processing after the first barcode matching specific requirements is found
Barcode = reader.NextBarcode();
}
}
Sub ReadBarcodes2DFirstNext(imageFile As String)
' Create objects and open input images
Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer()
Dim Barcode As CiBarcode, reader As Object
reader = ci.CreatePdf417() ' To read PDF416 barcodes
' reader = ci.CreateDataMatrix() ' To read DataMatrix barcodes
' reader = ci.CreateQR() ' To read QR barcodes
reader.Image.Open(imageFile, 1)
' Configure reader
' reader.Directions = FBarcodeDirections.cibHorz ' Limit barcode search direction (Faster processing)
Barcode = reader.FirstBarcode()
Do While Not Barcode Is Nothing
Console.WriteLine(Barcode.Text)
' If (barcodeFound) Then Exit For ' End processing after the first barcode matching specific requirements is found
Barcode = reader.NextBarcode()
Loop
End Sub