void ReadBarcodes1DFirstNext(string imageFile)
{
// Create objects and open input images
CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer();
CiBarcode Barcode;
CiBarcodePro reader = ci.CreateBarcodePro();
reader.Image.Open(imageFile, 1);
// Configure reader
reader.Type = FBarcodeType.cibfCode39 | FBarcodeType.cibfCode128; // Select barcode types to read
// reader.AutoDetect1D = true; // Enable automatic detection of barcode type (Slower processing)
// reader.Directions = FBarcodeDirections.cibHorz; // Limit barcode search direction (Faster processing)
Barcode = reader.FirstBarcode();
while (Barcode != null)
{
Console.WriteLine(Barcode.Text);
// If (barcodeFound) Then Exit For ' End processing after the first barcode matching specific requirements is found
Barcode = reader.NextBarcode();
}
}
Sub ReadBarcodes1DFirstNext(imageFile As String)
' Create objects and open input images
Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer()
Dim Barcode As CiBarcode
Dim reader As CiBarcodePro = ci.CreateBarcodePro()
reader.Image.Open(imageFile, 1)
' Configure reader
reader.Type = FBarcodeType.cibfCode39 + FBarcodeType.cibfCode128 ' Select barcode types to read
' reader.AutoDetect1D = True ' Enable automatic detection of barcode type (Slower processing)
' 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