How to set up the thermal label length or height in Zebra ZPL printers with VB.NET or C# by using ThermalLabel SDK for .NET

- Neodynamic ThermalLabel SDK for .NET
- Microsoft .NET Framework 2.0 (or greater)
- Microsoft Visual Studio 2005 / 2008
- Microsoft Visual Studio 2005 / 2008 Express Editions (VB, C#, J#, and C++)
- Any Zebra Thermal Printer supporting ZPL (Zebra Programming Language)

Neodynamic ThermalLabel SDK for .NET features PrintUtils class which lets you to control your Zebra ZPL printer by writing just pure .NET code in VB or C#.

When you need to load or change the roll media, you can instruct to the Zebra ZPL printer to automatically detect the label's length or height by using AutoSetLabelLength method of PrintUtils class.
When using AutoSetLabelLength method, the thermal printer will feed one or more blank labels depending on the size of the label. The following guide is about how to perform auto setting calibration for label's length.

IMPORTANT: To test the sample code you must have installed a Zebra ZPL thermal printer.

Follow these steps:
- Download and install latest version of Neodynamic ThermalLabel SDK for .NET
- Open Visual Studio 2005 /2008 and create a Windows Forms application.
- Add a reference to Neodynamic.SDK.ThermalLabel.dll assembly.
- Add a button control onto the form and paste the following code in the click event handler of the button:

Visual Basic .NET
'Set Printer settings for PrintUtils...
PrintUtils.PrinterSettings.Communication.CommunicationType = CommunicationType.USB
'Set Thermal Printer name
PrintUtils.PrinterSettings.PrinterName = "Zebra TLP2844-Z"
'Perform auto label length calibration...

Visual C# .NET
//Set Printer settings for PrintUtils...
PrintUtils.PrinterSettings.Communication.CommunicationType = CommunicationType.USB;
//Set Thermal Printer name
PrintUtils.PrinterSettings.PrinterName = "Zebra TLP2844-Z";
//Perform auto label length calibration...

- Run the sample Windows Forms application and test it. The Thermal Printer should feed one or more blank labels. After that, you can create a ThermalLabel object to verify the new label height was correctly set up by the printer.

This Demo
More Demos
Download ThermalLabel SDK for .NET
More Information about Neodynamic ThermalLabel SDK for .NET

.NET Components & Controls