Purpose

The purpose of the ZPL Viewer Unit Test is to allow users to learn and understand how to setup and use the ZPL Viewer custom widget plugin in their Tulip applications. Custom widget plugins are coded widgets that sit on top of the Tulip platform to give additional functionality that is not currently part of the main platform. The ZPL code render widget will render ZPL code as an image for use in your Tulip application.

It can be used to preview a ZPL label before printing or to print out a ZPL label on a non-ZPL printer.

Setup

Custom Widget Plugins interact with your application through the use of properties and events. Properties are the shared data that exists between your application and widget, while events are signals that your widget can send to your application. In your app editor you can build triggers based off these events. Events can be made to send data to your application as well.

The ZPL Viewer Custom Widget Plugin makes use of one property and zero events. The property being used in this widget is named 'ZPL Code' and is of type text and is read-only. This property allows you to input ZPL code in text format.

How it Works

The ZPL Viewer Unit Test provides examples on how to pass ZPL code using a variable datasource and a table datasource, and also provides an example on how to build ZPL code from a text input. For the first two examples, ZPL code is passed into the 'ZPL code' property of the custom widget plugin, and the widget renders this ZPL code and displays the ZPL label rendered as an image. For the third example, text is passed into the widget, and when you press the 'generate ZPL' button, ZPL code is created for this text, and the custom widget plugin then uses this ZPL code to build out a ZPL label.

Video Overview of Application

Did this answer your question?