Neodynamic Barcode Professional for WPF (any version)
Microsoft .NET Framework 3.0 or greater
Microsoft Visual Studio 2008 (Optional)
Microsoft Visual Basic 2008 Express Edition (Optional)
Microsoft Visual C# 2008 Express Edition (Optional)
It's very common to need to create a barcode in order it fits a given area, for instance: The barcode must fit an area of size 1.5 inch x 1 inch.
Barcode Professional for WPF was designed keeping this requirement in mind. Barcode Professional for WPF package includes two classes for barcode generation in WPF applications/scenarios, BarcodeProfessional and BarcodeBuilder.
Brief summary of BarcodeProfessional and BarcodeBuilder classes:
Independently of the Barcode Professional for WPF class you opt for, both classes let you to create barcodes fitting a given area by just setting up the FitBarcodeToSize property.
Examples
You want to encode the data 1234567890 in Code 128 and the barcode must fit an area of size 1.5 inch x 0.75 inch
Follow these steps:
You want to encode the data 1234567890 in Code 128 and the barcode must fit an area of size 1.5 inch x 0.75 inch. The barcode images will be saved as PNG format at 300DPI.
Private Sub SaveBarcode()
'Create a BarcodeBuilder object
Dim bc As New Neodynamic.WPF.BarcodeBuilder()
'Set the barcode symbology to Code 128
bc.Symbology = Neodynamic.WPF.Symbology.Code128
'Set the value to encode
bc.Code = "1234567890"
'Barcode dimensions settings
bc.BarcodeUnit = Neodynamic.WPF.BarcodeUnit.Inch
bc.FitBarcodeToSize = New System.Windows.Size(1.5D, 0.75D)
'Output image settings
bc.ImageSettings.Dpi = 300
bc.ImageSettings.ImageFormat = Neodynamic.WPF.ImageFormat.Png
'Save the PNG barcode image on disk
bc.Save("C:\barcode128.png")
End Sub
private void SaveBarcode()
{
//Create a BarcodeBuilder object
Neodynamic.WPF.BarcodeBuilder bc = new Neodynamic.WPF.BarcodeBuilder();
//Set the barcode symbology to Code 128
bc.Symbology = Neodynamic.WPF.Symbology.Code128;
//Set the value to encode
bc.Code = "1234567890";
//Barcode dimensions settings
bc.BarcodeUnit = Neodynamic.WPF.BarcodeUnit.Inch;
bc.FitBarcodeToSize = new System.Windows.Size(1.5d, 0.75d);
//Output image settings
bc.ImageSettings.Dpi = 300;
bc.ImageSettings.ImageFormat = Neodynamic.WPF.ImageFormat.Png;
//Save the PNG barcode image on disk
bc.Save(@"C:\barcode128.png");
}
We provide best-in-class customer service and support directly from members of our dev team! If we are available when you contact us, you will get a response in few minutes; otherwise the maximum turnaround is 24hs in most cases.