Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Announcements > Vendor Announcements

Vendor Announcements News and Information from Vendors - New Product Releases, New Versions, ...(moderated)

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-08-2009, 3:16 PM
Neodynamic's Avatar
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Dec 2005
Posts: 93
Reputation: 55
Neodynamic is on a distinguished programming path ahead
Thumbs up How to print GS1 DataBar RSS 14 barcodes with Zebra ZPL printers and VB.NET

How to print GS1 DataBar RSS 14 barcodes with Zebra ZPL printers and VB.NET or C# by using ThermalLabel SDK for .NET

Prerequisites
- 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)

All Zebra (ZPL-based) thermal barcode printers provide built-in support for printing GS1 DataBar barcode family (formerly RSS - Reduced Space Symbology) as well as other barcode standards

GS1 DataBar is a family of linear barcode symbologies used within the GS1 System.
- GS1 DataBar-14 encodes AI (01) in a linear symbol that can be scanned omnidirectionally by suitably programmed slot scanners.
- GS1 DataBar Limited (formerly RSS Limited) encodes AI (01) in a linear symbol for use on small items that will not be scanned in an omnidirectional scanning environment.
- GS1 DataBar Expanded (formerly RSS Expanded) encodes GS1 System primary item identification plus supplementary AI Element Strings, such as weight and "best before" date, in a linear symbol that can be scanned omnidirectionally by suitably programmed slot scanners.
- GS1 DataBar-14 Stacked is a variation of the GS1 DataBar-14 Symbology that is stacked in two rows and used when the normal symbol would be too wide for the application. It comes in two versions: a truncated version used for small item marking applications and a taller version that is designed to be read by omnidirectional scanners.

In this guide you will learn how to print GS1 DataBar barcodes with Zebra ZPL printers by using ThermalLabel SDK for .NET

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

Follow these steps:
1- Download and install latest version of Neodynamic ThermalLabel SDK for .NET
2- Open Visual Studio 2005 /2008 and create a Windows Forms application.
3- Add a reference to Neodynamic.SDK.ThermalLabel.dll assembly.
4- Example of encoding GS1 DataBar Omnidirectional (formerly RSS-14)
The value to encode is (01) 00614141999996. Please note that you must not specify the AI number i.e. 01 nor the checksum i.e. last 6 number to the Code property or in the BarcodeItem constructor.

Add a button control onto the form and paste the following code in the click event handler of the button:

Visual Basic .NET
'Define a ThermalLabel object and set unit to cm and label size
Dim tLabel As New ThermalLabel(UnitType.Cm, 10, 8)

'Define a BarcodeItem object
Dim bc As New BarcodeItem(1, 2, BarcodeSymbology.GS1DataBarOmnidirectional, "0061414199999")
'Set bars' width and height magnification factor...
bc.MagnificationFactor = 3

'Add items to ThermalLabel object...
tLabel.Items.Add(bc)

'Create a PrintJob object
Dim pj As New PrintJob()
'Thermal Printer is connected through USB
pj.PrinterSettings.Communication.CommunicationType = CommunicationType.USB
'Set Thermal Printer resolution
pj.PrinterSettings.Dpi = 203
'Set Thermal Printer name
pj.PrinterSettings.PrinterName = "Zebra TLP2844-Z"
'Print ThermalLabel object...
pj.Print(tLabel)



5- Example of encoding GS1 DataBar Limited (formerly RSS Limited)
The value to encode is (01) 00614141999996. Please note that you must not specify the AI number i.e. 01 nor the checksum i.e. last 6 number to the Code property or in the BarcodeItem constructor.

Add another button control onto the form and paste the following code in the click event handler of the button:

Visual Basic .NET
'Define a ThermalLabel object and set unit to cm and label size
Dim tLabel As New ThermalLabel(UnitType.Cm, 10, 8)

'Define a BarcodeItem object
Dim bc As New BarcodeItem(1, 2, BarcodeSymbology.GS1DataBarLimited, "0061414199999")
'Set bars' width and height magnification factor...
bc.MagnificationFactor = 3

'Add items to ThermalLabel object...
tLabel.Items.Add(bc)

'Create a PrintJob object
Dim pj As New PrintJob()
'Thermal Printer is connected through USB
pj.PrinterSettings.Communication.CommunicationType = CommunicationType.USB
'Set Thermal Printer resolution
pj.PrinterSettings.Dpi = 203
'Set Thermal Printer name
pj.PrinterSettings.PrinterName = "Zebra TLP2844-Z"
'Print ThermalLabel object...
pj.Print(tLabel)



6- Example of encoding GS1 DataBar Expanded (formerly RSS Expanded)
The value to encode is (01) 00614141999996. Please note that you must not specify the AI number i.e. 01 nor the checksum i.e. last 6 number to the Code property or in the BarcodeItem constructor.

Add another button control onto the form and paste the following code in the click event handler of the button:

Visual Basic .NET
'Define a ThermalLabel object and set unit to cm and label size
Dim tLabel As New ThermalLabel(UnitType.Cm, 10, 8)

'Define a BarcodeItem object
Dim bc As New BarcodeItem(1, 2, BarcodeSymbology.GS1DataBarExpanded, "0061414199999")
'Set bars' width and height magnification factor...
bc.MagnificationFactor = 3

'Add items to ThermalLabel object...
tLabel.Items.Add(bc)

'Create a PrintJob object
Dim pj As New PrintJob()
'Thermal Printer is connected through USB
pj.PrinterSettings.Communication.CommunicationType = CommunicationType.USB
'Set Thermal Printer resolution
pj.PrinterSettings.Dpi = 203
'Set Thermal Printer name
pj.PrinterSettings.PrinterName = "Zebra TLP2844-Z"
'Print ThermalLabel object...
pj.Print(tLabel)



7- Example of encoding GS1 DataBar Stacked (formerly RSS-14 Stacked)
The value to encode is (01) 00614141999996. Please note that you must not specify the AI number i.e. 01 nor the checksum i.e. last 6 number to the Code property or in the BarcodeItem constructor.

Add another button control onto the form and paste the following code in the click event handler of the button:

Visual Basic .NET
'Define a ThermalLabel object and set unit to cm and label size
Dim tLabel As New ThermalLabel(UnitType.Cm, 10, 8)

'Define a BarcodeItem object
Dim bc As New BarcodeItem(1, 2, BarcodeSymbology.GS1DataBarStacked, "0061414199999")
'Set bars' width and height magnification factor...
bc.MagnificationFactor = 3

'Add items to ThermalLabel object...
tLabel.Items.Add(bc)

'Create a PrintJob object
Dim pj As New PrintJob()
'Thermal Printer is connected through USB
pj.PrinterSettings.Communication.CommunicationType = CommunicationType.USB
'Set Thermal Printer resolution
pj.PrinterSettings.Dpi = 203
'Set Thermal Printer name
pj.PrinterSettings.PrinterName = "Zebra TLP2844-Z"
'Print ThermalLabel object...
pj.Print(tLabel)



8- Example of encoding GS1 DataBar Stacked Omnidirectional (formerly RSS-14 Stacked Omnidirectional)
The value to encode is (01) 00614141999996. Please note that you must not specify the AI number i.e. 01 nor the checksum i.e. last 6 number to the Code property or in the BarcodeItem constructor.

Add another button control onto the form and paste the following code in the click event handler of the button:

Visual Basic .NET
'Define a ThermalLabel object and set unit to cm and label size
Dim tLabel As New ThermalLabel(UnitType.Cm, 10, 8)

'Define a BarcodeItem object
Dim bc As New BarcodeItem(1, 2, BarcodeSymbology.GS1DataBarStackedOmnidirectional, "0061414199999")
'Set bars' width and height magnification factor...
bc.MagnificationFactor = 3

'Add items to ThermalLabel object...
tLabel.Items.Add(bc)

'Create a PrintJob object
Dim pj As New PrintJob()
'Thermal Printer is connected through USB
pj.PrinterSettings.Communication.CommunicationType = CommunicationType.USB
'Set Thermal Printer resolution
pj.PrinterSettings.Dpi = 203
'Set Thermal Printer name
pj.PrinterSettings.PrinterName = "Zebra TLP2844-Z"
'Print ThermalLabel object...
pj.Print(tLabel)



9- Example of encoding GS1 DataBar Truncated (formerly RSS-14 Truncated)
The value to encode is (01) 00614141999996. Please note that you must not specify the AI number i.e. 01 nor the checksum i.e. last 6 number to the Code property or in the BarcodeItem constructor.

Add another button control onto the form and paste the following code in the click event handler of the button:

Visual Basic .NET
'Define a ThermalLabel object and set unit to cm and label size
Dim tLabel As New ThermalLabel(UnitType.Cm, 10, 8)

'Define a BarcodeItem object
Dim bc As New BarcodeItem(1, 2, BarcodeSymbology.GS1DataBarTruncated, "0061414199999")
'Set bars' width and height magnification factor...
bc.MagnificationFactor = 3

'Add items to ThermalLabel object...
tLabel.Items.Add(bc)

'Create a PrintJob object
Dim pj As New PrintJob()
'Thermal Printer is connected through USB
pj.PrinterSettings.Communication.CommunicationType = CommunicationType.USB
'Set Thermal Printer resolution
pj.PrinterSettings.Dpi = 203
'Set Thermal Printer name
pj.PrinterSettings.PrinterName = "Zebra TLP2844-Z"
'Print ThermalLabel object...
pj.Print(tLabel)



10- Run the sample Windows Forms application and test it.


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


Neodynamic
.NET Components & Controls
Neodynamic
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
.net, barcodes, thermallabel, zebra, zpl


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 4:14 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.