Founded in 2004, Neodynamic designs and develops Barcode, Imaging, Labeling & Printing Tools for .NET & Web developers. We are experts in those fields with strong know-how on .NET, ASP.NET, SSRS, PHP & HTML/JS projects. More...
This approach is deprecated. Latest version of ThermalLabel SDK for .NET handles this automatically.
Requirements
Neodynamic ThermalLabel SDK v2.0-v3.0 for .NET
NOTE: This demo works with ThermalLabel SDK v2.0-v3.0 but NOT with v4.0
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) or EPL (Eltron Programming Language)
All Zebra (ZPL-based and EPL-based) thermal barcode printers provide built-in support for printing UPS Maxicode barcodes as well as other barcode standards.
MaxiCode is a two-dimensional barcode, optically read i.e. not scanned, originally created and used by United Parcel Service (UPS). It is suitable for tracking and managing the shipment of packages.
Maxicode supports a set of Modes (from 2 to 6). When using Mode 2 and 3, the value to encode in a Maxicode symbol must fit the following message structures:
UPS Maxicode Mode 2 message format or structure
3-digit class of service
3-digit country zip code. Mode 2 supports the US Country Code (840). For other country codes please use Mode 3 instead.
5-digit zip code
4-digit zip code extension (if none exists, four zeros 0000 must be specified)
[)>RS (Message Header)
01GS96 (Format Header)
<tracking number> (Mandatory Data for UPS)
GS<SCAC> (Mandatory Data for UPS)
GS<UPS shipper number>
GS<Julian day of pickup>
GS<shipment ID number>
GS<n/x> (Package n/x)
GS<package weight>
GS<address validation>
GS<ship to street address>
GS<ship to city>
GS<ship to state>
RS
EOT (End of Message)
Where GS (ASCII 29) is used to separate fields in a message; RS (ASCII 30) is used to separate format types; and EOT (ASCII 4) is the end of transmission characters.
UPS Maxicode Mode 3 message format or structure
3-digit class of service
3-digit country zip code. Mode 3 is used for non-US Country Code. For US Country Code (840) please use Mode 2 instead.
6-alphanumeric characters zip code (A through Z or 0 to 9)
[)>RS (Message Header)
01GS96 (Format Header)
<tracking number> (Mandatory Data for UPS)
GS<SCAC> (Mandatory Data for UPS)
GS<UPS shipper number>
GS<Julian day of pickup>
GS<shipment ID number>
GS<n/x> (Package n/x)
GS<package weight>
GS<address validation>
GS<ship to street address>
GS<ship to city>
GS<ship to state>
RS
EOT (End of Message)
Where GS (ASCII 29) is used to separate fields in a message; RS (ASCII 30) is used to separate format types; and EOT (ASCII 4) is the end of transmission characters.
In this guide you will learn how to print UPS Maxicode barcodes in both Mode 2 and Mode 3 with Zebra ZPL printers by using ThermalLabel SDK for .NET
IMPORTANT: To test the sample code you must have installed a Zebra ZPL-based or EPL-based thermal printer.
Open Visual Studio 2005 /2008 and create a Windows Forms application.
Add a reference to Neodynamic.SDK.ThermalLabel.dll assembly.
Example of encoding UPS Maxicode in Mode 2
Encoding 5 digit numeric US postal (zip) code padded with 4 zero's(0). Country code is 840 and Zip Code is 10045-0000.
Add a button control onto the form and paste the following code in the click event handler of the button:
IMPORTANT NOTICE
Although ThermalLabel SDK supports both ZPL and EPL printers, a label design you write using .NET code like C# or VB.NET will not produce the same output printing under ZPL and EPL printers. If you need to support both printer languages in your project then you will have to design two different labels targeting each printer language separately.
Example of encoding UPS Maxicode in Mode 3
Encoding 4 digit alpha-numeric UK postal code, padded with 2 trailing spaces to equal 6 characters as required by Mode 3 message format. Country Code is 826 and Postal Code is RS19 followed by two spaces.
Add another button control onto the form and paste the following code in the click event handler of the button:
IMPORTANT NOTICE
Although ThermalLabel SDK supports both ZPL and EPL printers, a label design you write using .NET code like C# or VB.NET will not produce the same output printing under ZPL and EPL printers. If you need to support both printer languages in your project then you will have to design two different labels targeting each printer language separately.
Run the sample Windows Forms application and test it.