This document contains information proprietary to Zebra Technologies Corporation.
This document and the information contained within is Copyrighted by Zebra
Technologies Corporation and may not be duplicated in full or in part by any person
without written approval from Zebra.
While every effort has been made to keep the information contained within current
and accurate as of the date of publication, no guarantee is given that the document
is error-free or that it is accurate with regard to any specication. Zebra Technologies
Corporation reserves the right to make changes, for the purpose of product
improvement, at any time.
Trademarks
Zebra is a registered trademark and Virtual PrintWare is a trademark of Zebra
Technologies Corporation. Windows is a registered trademark of Microsoft
Corporation in the United States and other countries. All other trademarks or
registered trademarks are marks of their respective holders.
Close a TCP/IP Connection ........................................................................................................... 37
Worldwide Support ....................................................................................................... 39
ii PrintManager Programmer's Reference Manual P1057447-002
Purpose
1
Introduction
The purpose of this manual is to dene and describe the PrintManager application
programming interface (API). The PrintManager API supports two methodologies for
interfacing to an application: Message-based printing and SDK-based printing; both
methods require communication via TCP/IP or via drag-and-drop from a hot-drop
folder.
PrintManager is a service that runs on Microsoft Windows operating systems.
PrintManager can process ZMotif-based and message-based jobs—this includes
template- and job-based which both support XML and CSV. PrintManager creates
print jobs from the received data, directing the jobs to the appropriate printers.
PrintManager supports the ZXP Series 3, ZXP Series 7, and ZXP Series 8 Card
Printers.
PrintManager stores templates and images to be used for template-based printing.
Templates are XML documents, and images are binary data which may be one of
many formats including bitmap and jpeg. The variable data for a template-based print
job is packaged as a data document in XML or CSV le format. The ZMotif SDK is
used to build print jobs from templates, image les, and data documents.
PrintManager can also receive ZMotif-based jobs directly. The ZMotif SDK can be
used to build and send a print job to PrintManager.
ZMotif Job
XML Doc
Data Document
CSV Doc
Print Manager
PrintManager consists of three modules: Queue, Store, and Job. Queue Modules
are virtual printers that receive data streams, parse the data, and send the data
to the Store Module. The Store Module saves the data for future processing. The
Job Module gets data via the Store Module, analyzes the data, creates print jobs,
determines the appropriate printer, and tracks job status.
PrintManager Data consists of job-specic data received by PrintManager for
purposes of performing template- and job-based printing using the message interface
described in this manual. The job-specic data must be formatted as a document
using the XML or CSV le formats. The data document is delivered to PrintManager
via TCP/IP from any host capable of streaming data documents via TCP/IP such as
Linux, UNIX, and Microsoft Windows
The XML document shown below is an example of an XML-formatted data document
used for a template-based print job.
Print Job Processing refers to the tasks required to complete a print job. The tasks
associated with the completion of a print job include receiving data documents when
template-based job messaging is in use, receiving job xml les when job-based
messaging is in use, and receiving ZMotif-based jobs when the ZMotif SDK is in use.
Template-Based Printing is a process that combines a template document and its
required images (if appropriate) with a data document to create a ZMotif-based print
job.
PrintManager uses the ZMotif SDK to build a print job from a template, its required
image(s), and a data document.
Template documents specify the card layout by dening the required parameters.
These parameters include combinations of the following elements: font types, the
number of sides to print (single or double), graphics, text, barcode, lines, rectangles,
ellipses, and magnetic encoding (if supported). Some of these parameters become
placeholders for data—the data document contains the data required by these
placeholders.
Before a template and its required image(s) can be used by PrintManager to
build a ZMotif-based print job, the template and image(s) must be stored where
PrintManager can locate them. The template interface specication includes
commands which enable templates and images to be programmatically stored by
PrintManager.
Introduction
Template-Based Printing
ZMotif is a print job language that contains job characteristics and binary images.
Software tools for Microsoft Windows developers that generate ZMotif are the ZXP
Series printer drivers, and ZMotif Software Developer Kits (SDKs).
Data documents specify data to be bound with a template at job creation—they can
be XML or CSV formatted documents.
The following XML document is an example of an xml-formatted data document used
by the sample template on the previous page; its contents would be merged with the
sample template’s contents to create a print job.
XML Data Document
<data template=”text_job”>
(template to be used with the data)
<logo>zebra_logo</ logo >
(data for print job)
<Firstname>John</ Firstname >
(data for print job)
<Lastname>Doe</ Lastname >
(data for print job)
</data>
The following CSV document is an example of a CSV-formatted data document used
by the sample template on the previous page; its contents would be merged with the
sample template’s contents to create a print job.
CSV Data Document
template,logo,Firstname,Lastnametext_job,zebra_logo,John,Doe
CSV Data Docuement Items (not part of the CSV document)
Template, placeholder in template
logo, placeholder in template
Firstname, place holder in template
Lastname placeholder in template
text_job, template to be used with the data
SDK-based printing is a process that makes use of Zebra’s ZMotif SDKs for building
print jobs and sending them to PrintManager.
An application would use various methods in the SDK to build a print job. Once built,
the job is then sent to PrintManager by making use of other methods available in the
SDK. Unlike template-based printing, SDK-based printing delivers pre-built jobs to
the PrintManager; therefore, it is not required to build the job. Instead, PrintManager
simply forwards the job to an appropriate printer.
This chapter describes the methods for interfacing an application to PrintManager:
template-based printing and SDK-based. The chapter focuses on ZXP Card Interface
which is the message-based specication for template-based jobs; it also provides
an introduction to the SKD-based approach.
2
Template-based printing makes use of template documents and data documents
to build print jobs. A template document describes a card’s layout by dening fonts,
sides, graphics, text, barcodes, QR codes, lines, rectangles, ellipses and magnetic
encoding. The template also species data and image binding. A data document
denes the information unique to a card such as a customer’s name, an employee’s
identication number, and date of expiration.
SDK-based printing makes use of the ZMotif Printer and Graphics SDKs to build print
jobs. Using the SDK approach, each job is built through the use of methods provided
by the SDK as if all aspects of the job were unique, even if common background
images, titles, etc are part of each card produced.
The ZXP Card interface provides a standardized process for sending and receiving
data to/from the PrintManager. Data documents can be comma-separated values
(CSV), XML documents or binary data. Data is sent within an interface command
payload; the payload can be: templates, images, job data, or functional commands.
Responses will be XML formatted documents or binary data.
There are four ZXP Card interface commands supported by PrintManager: Store,
Submit, Delete and Request. The Store command downloads templates and images
on the PrintManager. The Delete command removes templates and images from
the PrintManager. The Submit command sends data or functional commands to be
processed by the PrintManager. The request command is used to request specic
information from PrintManager including job status, list of available queues, and a