www.krengeltech.com

Krengel Ship for UPS ZPL Printing

From Wiki

User Guide

Contents

Overview

The ZPL Printing API allows a ZPL format label to be sent to a ZPL-compatible Zebra label printer.

Example

ZPL Printing example

This example assumes you already have a ZPL label as a result of a call to the Package Shipping API. You will want to substitute the correct IFS file path for your label.

ZPL Printing example w/example IFS path

Pressing Enter will submit this request to the ZPL Printing API, and return a response as shown below:

ZPL printing result

At this point, assuming you haven't set up a printer override or changed OUTQ settings, your ZPL will be a spooled file in QPRINT. Enter command WRKSPLF, and you should see the file as shown below:

ZPL spooled file

If you use option 5 as illustrated, you should see a screen similar to that shown below:

ZPL spooled file contents

At this point, you could release this file to your Zebra printer. If you don't want a two step process, you could change the configuration of printer file ZPLPRINT to direct which OUTQ it is directed to.

Technical Information

This API section in UPSUI is making use of the following elements:

API Function

The Krengel Ship for UPS API function used is UPS_printZPL.

Technical Example

This is a brief explanation of how this API is implemented in the included Krengel Ship for UPS User Interface program. You can use the source code for the Krengel Ship for UPS User Interface combined with this example to implement the API in your existing business programs.

  1. Define the Krengel Ship for UPS Error Data Structure.
  2. Call UPS_printZPL, passing a full IFS path to a ZPL label, and the Krengel Ship for UPS Error Data Structure.
  3. The UPS_printZPL API will format the ZPL data properly, and print it to a spooled file.
  4. Check the Krengel Ship for UPS Error Data Structure to see if an error occurred. If an error did not occur, your label will either be a spooled file, or if you applied an OVRPRTF or changed the OUTQ, will be printing.