QuietZone Property (ISO15415QualityTest)
In This Topic
Gets the barcode quiet zone, in percentages, which is required by barcode symbology specification.
Syntax
Remarks
Quiet Zone is an optional parameter that can be a useful process control tool for check quiet zone required by barcode symbology specification. Quiet Zone does not affect the overall grade.
Quiet zone size can be changed using the SetQuietZoneSize(BarcodeType,Int32) method.
Example
Here is an example that demonstrates how to check quiet zone of 2D barcode:
Imports Vintasoft.Barcode
Imports Vintasoft.Barcode.QualityTests
Public Class ISO15415QualityTestQuietZoneExample
''' <summary>
''' Prints the information about quiet zone of 2D barcode.
''' </summary>
''' <param name="filename">The filename.</param>
''' <param name="barcodeType">Type of the barcode.</param>
Public Shared Sub PrintQuietZoneInfo2D(filename As String, barcodeType As BarcodeType)
Using qualityTestManager As New QualityTestManager(barcodeType)
' recognize barcodes and execute testing for recognized barcodes
qualityTestManager.ExecuteTesting(filename)
' for each recognized barcode
For Each qualityTest As ISO15415QualityTest In qualityTestManager.ISO15415Results
' print the quality test information
Console.WriteLine("Barcode Type: {0}", qualityTest.BarcodeInfo.BarcodeType)
Console.WriteLine("Required Quiet Zone: {0}X", qualityTest.QuietZoneSize)
Console.WriteLine("Barcode value: {0}", qualityTest.BarcodeInfo.Value)
Console.WriteLine("Quiet Zone: {0}%", Math.Round(qualityTest.QuietZone.Value, 1))
Next
End Using
End Sub
End Class
using System;
using Vintasoft.Barcode;
using Vintasoft.Barcode.QualityTests;
public class ISO15415QualityTestQuietZoneExample
{
/// <summary>
/// Prints the information about quiet zone of 2D barcode.
/// </summary>
/// <param name="filename">The filename.</param>
/// <param name="barcodeType">Type of the barcode.</param>
public static void PrintQuietZoneInfo2D(string filename, BarcodeType barcodeType)
{
using (QualityTestManager qualityTestManager = new QualityTestManager(barcodeType))
{
// recognize barcodes and execute testing for recognized barcodes
qualityTestManager.ExecuteTesting(filename);
// for each recognized barcode
foreach (ISO15415QualityTest qualityTest in qualityTestManager.ISO15415Results)
{
// print the quality test information
Console.WriteLine("Barcode Type: {0}", qualityTest.BarcodeInfo.BarcodeType);
Console.WriteLine("Required Quiet Zone: {0}X", qualityTest.QuietZoneSize);
Console.WriteLine("Barcode value: {0}", qualityTest.BarcodeInfo.Value);
Console.WriteLine("Quiet Zone: {0}%", Math.Round(qualityTest.QuietZone.Value, 1));
}
}
}
}
Requirements
Target Platforms: .NET 11; .NET 10; .NET 9; .NET 8; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5
See Also