Zebra OPOS ZPL & CPCL Programmers Guide
Zebra OPOS ZPL & CPCL Programmers Guide
P1014152-002
2011 ZIH Corp. The copyrights in this manual and the software and/or firmware in the printer described
therein are owned by ZIH Corp. and Zebras licensors. Unauthorized reproduction of this manual or the software and/
or firmware in the printer may result in imprisonment of up to one year and fines of up to $10,000 (17 U.S.C.506).
Copyright violators may be subject to civil liability.
This product may contain ZPL, ZPL II, and ZebraLink programs; Element Energy Equalizer Circuit; E3;
and Monotype Imaging fonts. Software ZIH Corp. All rights reserved worldwide.
ZebraLink, and all product names and numbers are trademarks, and Zebra, the Zebra head graphic, ZPL and ZPL II
are registered trademarks of ZIH Corp. All rights reserved worldwide.
All other brand names, product names, or trademarks belong to their respective holders. For additional trademark
information, please see Trademarks on the product CD.
Proprietary Statement This manual contains proprietary information of Zebra Technologies Corporation and its
subsidiaries (Zebra Technologies). It is intended solely for the information and use of parties operating and
maintaining the equipment described herein. Such proprietary information may not be used, reproduced, or disclosed
to any other parties for any other purpose without the express, written permission of Zebra Technologies Corporation.
Liability Disclaimer Zebra Technologies Corporation takes steps to ensure that its published Engineering
specifications and manuals are correct; however, errors do occur. Zebra Technologies Corporation reserves the right
to correct any such errors and disclaims liability resulting therefrom.
Limitation of Liability In no event shall Zebra Technologies Corporation or anyone else involved in the creation,
production, or delivery of the accompanying product (including hardware and software) be liable for any damages
whatsoever (including, without limitation, consequential damages including loss of business profits, business
interruption, or loss of business information) arising out of the use of, the results of use of, or inability to use such
product, even if Zebra Technologies Corporation has been advised of the possibility of such damages. Some
jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation
or exclusion may not apply to you.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Contents
6
6
6
7
8
1 OPOS Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
OLE for Retail POS Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
How an Application Uses an OPOS Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
12
13
13
15
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
Contents
22
23
24
25
29
30
5 Device Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Using the Device Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using Bluetooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using an IP Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using a Parallel Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using a Serial Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using a USB Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a KR403 Kiosk Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Font Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a New Font in Device Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assigning Multiple Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deleting a Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Tips For Using Additional ZPL Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Use of OPOS Character Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
KR403 Specific User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Kiosk Printer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Kiosk Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Details for Variable Continuous Mode vs. Continuous Mode . . . . . . . . . . . . . . . . . . .
32
34
35
36
37
38
39
39
41
44
45
45
48
49
50
52
53
53
53
55
6 Test Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Preparing Windows and Printer for Unicode Printing . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Zebra OPOS Test Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Printing Unicode with the Test Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
This section provides you with contact information, document structure and organization, and
additional reference documents.
Contents
Who Should Use This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OPOS Web Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How This Document Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
6
6
6
7
8
P1014152-002 Rev. A
Description
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Contacts
Technical Support via the Internet is available 24 hours per day, 365 days per year.
Web Site: www.zebra.com
E-mail Back Technical Library:
E-mail address: [email protected]
Subject line: Emaillist
Self Service Knowledge Base: www.zebra.com/knowledgebase
Online Case Registration: www.zebra.com/techrequest
Which Department
Do You Need?
Regional Headquarters
The Americas
Zebra Technologies Corporation
475 Half Day Road, Suite 500
Lincolnshire, IL 60069 USA
T: +1 847 634 6700
Toll-free +1 866 230 9494
F: +1 847 913 8766
Asia Pacific
and India
Zebra Technologies Asia Pacific
Pte. Ltd.
120 Robinson Road
#06-01 Parakou Building
Singapore 068913
T: + 65 6858 0722
F: +65 6885 0838
Hardware: [email protected]
Software: [email protected]
E: China: [email protected]
All other areas:
[email protected]
E: China: [email protected]
All other areas:
[email protected]
T: + 65 6858 0722
F: +65 6885 0838
E: China: [email protected]
All other areas:
[email protected]
E: China:
[email protected]
All other areas:
[email protected]
m
E: China: [email protected]
All other areas:
[email protected]
Kiosk printers:
T: +1 866 322 5202
E: [email protected]
Inquiry Department
Customer Service
Department (US)
Internal Sales
Department (UK)
For printers, parts, media,
and ribbon, please call your
distributor or contact us.
Key:
T: Telephone
F: Facsimile
E: E-mail
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
Document Conventions
The following conventions are used throughout this document to convey certain information.
Alternate Color (online only) Cross-references contain hot links to other sections in this
guide. If you are viewing this guide online in.pdf format, you can click the cross-reference
(blue text) to jump directly to its location.
Command Line Examples Command line examples appear in Courier New font. For
example, type ZTools to get to the Post-Install scripts in the bin directory.
Files and Directories File names and directories appear in Courier New font. For
example, the Zebra<version number>.tar file and the /root directory.
Icons Used
Important Advises you of information that is essential to complete a task.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
1
OPOS Information
Contents
OLE for Retail POS Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
How an Application Uses an OPOS Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
10
OPOS Information
OLE for Retail POS Controls
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
2
Supported Bar Codes
and Fonts
Contents
Supported Bar Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Supported Fonts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ZPL Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CPCL Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
12
13
13
15
P1014152-002 Rev. A
12
Supported in
ZPL
Supported in
CPCL
Codabar
Yes
Yes
Code 128
Yes
Yes
Yes
Yes
Code 39
Yes
Yes
Code 93
Yes
Yes
* EAN 128
Yes
Yes
EAN 13s
Yes
Yes
EAN 8S
Yes
Yes
EANJan 13
Yes
Yes
EANJan 8
Yes
Yes
ltf
Yes
Yes
* Maxicode
Yes
Yes
* PDF417
Yes
Yes
* RSS14
Yes
Yes
* RSSExpanded
Yes
Yes
TF
Yes
No
UPC-A
Yes
Yes
* UPC-AS
Yes
Yes
UPC-D
Yes
Yes
UPC-D2
Yes
Yes
UPC-D3
Yes
No
UPC-D4
Yes
No
UPC-D5
Yes
Yes
* OCR-A
Yes
Yes
OCR-B
No
No
UPC-E
Yes
Yes
* UPC-ES
Yes
Yes
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Supported Fonts
ZPL Fonts
Font Typeface
(Value for # in
ESC|#fT)
Font Name
Font Size
(h x w)
Line
Height
Inter-Character
Gap (dots)
Total Width
(dots)
18 x 10
24
12
26 x 13
30
16
9x5
12
Font D
Font D will be the default font. If nothing is specified in the print command, this font will be
used. The spacing between lines shall be 24 dots. Counting the inter-character gap of 2 dots the
characters are 12 dots wide. In calculating the number of characters that can be placed on an
832 dot line, the result is 69 characters.
Example command:
PrintNormal 123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ6789012345678901234567890123456789
PrintNormal 0987654321abcdefghijklmnopqrstuvwxyz65432109876543210987654321098765432
PrintNormal 123456789012345678901234567890123456789012345678901234567890123456789
PrintNormal 098765432109876543210987654321098765432109876543210987654321098765432
Printed Image:
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
13
14
Font F
The spacing between lines shall be 28 dots. Counting the inter-character gap of 3 dots, the
characters are 16 dots wide. In calculating the number of characters that can be placed on an
832 dot line, the result is 52 characters.
Example command:
PrintNormal ESC|1fT1234567890123456789012345678901234567890123456789012
PrintNormal ESC|1fT0987654321098765432109876543210987654321098765432109
PrintNormal ESC|1fT1234567890123456789012345678901234567890123456789012
PrintNormal ESC|1fT0987654321098765432109876543210987654321098765432109
Printed Image:
Font A
The spacing between lines shall be 12 dots. Counting the inter-character gap of 1 dots, the
characters are 6 dots wide. In calculating the number of characters that can be placed on an
832 dot line, the result is 138 characters.
Example command:
PrintNormal ESC|2fT123456789012345678901234567890123456789012345678901234567890123456789
PrintNormal ESC|2fT 098765432109876543210987654321098765432109876543210987654321098765432
PrintNormal ESC|2fT123456789012345678901234567890123456789012345678901234567890123456789
PrintNormal ESC|2fT 098765432109876543210987654321098765432109876543210987654321098765432
Printed Image:
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
CPCL Fonts
Font Typeface
(Value for # in
ESC|#fT)
Font Name
Font Size
(h x w)
Line
Height
Total Width
(dots)
0 (24 x 12)
24
12
3 (18 x 16)
18
16
Printed Image:
Printed Image:
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
15
16
Notes ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
3
Supported Specifications
and Printers
Contents
Specifications Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Supported Printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
18
Specifications Supported
UPOS specification supported: v1.11
ActiveX supported
.net framework supported: 1.1
Supported Printers
P1014152-002 Rev. A
Printer Name
Maximum
Print Width
(in mm)
MZ 220
48
MZ 320
73
QL220 Plus
48
QL320 Plus
73
QL420 Plus
103
QLn220
48
QLn320
72
RW220
56
RW420
104
104
104
104
104
104
104
81
140XiIIIPlus
128
168
168
168
168
216
216
LP2824-Z
56
56
LP2844-Z
101
104
104
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
06/13/2011
Printer Name
Maximum
Print Width
(in mm)
56
56
104
104
104
104
81
168
168
GK420d
104
GK420t
104
GX420d
104
GX420t
104
KR403
82.5
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
19
20
Notes ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
4
Common Properties,
Methods, and Events
This chapter provides the common and specific commands for properties, methods, and
events.
Contents
Summary of Common Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of Common Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of Common Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of Specific Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of Specific Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
22
23
24
25
29
30
P1014152-002 Rev. A
22
Type/Access
Name
Supported for
Zebra ZPL
Printer
Supported for
Zebra CPCL
Printer
AutoDisable
Boolean /R/W
No
No
CapCompareFirmwareVersion
Boolean /R
No
No
BinaryConversion
Long R/W
Yes
Yes
CapPower Reporting
Long /R
Yes
Yes
CapStatisticsReporting
Boolean /R
No
No
CapUpdateFirmware
Boolean /R
No
No
CapUpdateStatistics
Boolean /R
No
No
CheckHealthTest
String /R
Yes
Yes
Claimed
Boolean /R
Yes
Yes
DataCount
Long /R
No
No
DataEventEnabled
Boolean /R/W
No
No
DeviceEnabled
Boolean /R/W
No
No
FreezeEvents
Boolean /R/W
Yes
Yes
OpenResult
Long /R
Yes
Yes
OutputID
Long /R
Yes
Yes
PowerNotify
Long /R/W
Yes
Yes
PowerState
Long /R
Yes
Yes
ResultCode
Long /R
Yes
Yes
ResultCodeExtended
Long /R
Yes
Yes
State
Long /R
Yes
Yes
ControlObjectDescription
String /R
Yes
Yes
ControlObjectVersion
Long /R
Yes
Yes
Service ObjectDescription
String /R
Yes
Yes
ServiceObjectVersion
Long /R
Yes
Yes
DeviceDescription
String /R
Yes
Yes
DeviceName
String /R
Yes
Yes
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
06/13/2011
Name
Supported for
Zebra ZPL
Printer
Supported for
Zebra CPCL
Printer
Open
Yes
Yes
Close
Yes
Yes
Claim
Yes
Yes
ReleaseDevice
Yes
Yes
CheckHealth
Yes
Yes
ClearInput
No
No
ClearInputProperties
No
No
ClearOutput
Yes
Yes
DirectIO
Yes
Yes
CompareFirmwareVersion
No
No
ResetStatistics
No
No
RetrieveStatistics
No
No
UpdateFirmware
No
No
UpdateStatistics
No
No
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
23
24
Supported for
Zebra CPCL
Printer
DataEvent
No
No
DirectIOEvent
Yes
Yes
ErrorEvent
Yes
Yes
OutputCompleteEvent
Yes
Yes
StatusUpdateEvent
Yes
Yes
Name
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Type/Access
Name
Supported for
Zebra ZPL
Printer
Supported for
Zebra CPCL
Printer
CapConcurrentJrnRec
Boolean /R
No
No
CapConcurrentJrnSlp
Boolean /R
No
No
CapConcurrentRecSlp
Boolean /R
No
No
CapCoverSensor
Boolean /R
Yes
Yes
CapTransaction
Boolean /R
Yes
Yes
CapConcurrentPageMode
Boolean /R
No
No
CapMapCharacterSet
Boolean /R
No
No
CapJrnPresent
Boolean /R
Yes
Yes
CapJrn2Color
Boolean /R
No
No
CapJrnBold
Boolean /R
Yes
Yes
CapJrnCartridgeSensor
Long /R
Yes
Yes
CapJrnColor
Long /R
Yes
Yes
CapJrnDhigh
Boolean /R
Yes
Yes
CapJrnDwide
Boolean /R
Yes
Yes
CapJrnDwideDhigh
Boolean /R
Yes
Yes
CapJrnEmptySensor
Boolean /R
Yes
Yes
CapJrnItalic
Boolean /R
No
No
CapJrnNearEndSensor
Boolean /R
No
No
CapJrnUnderline
Boolean /R
Yes
Yes
CapRecPresent
Boolean /R
Yes
Yes
CapRec2Color
Boolean /R
No
No
CapRecBarCode
Boolean /R
Yes
Yes
CapRecBitmap
Boolean /R
Yes
Yes
CapRecBold
Boolean /R
Yes
Yes
CapRecCartridgeSensor
Long /R
Yes
Yes
CapRecColor
Long /R
Yes
Yes
CapRecDhigh
Boolean /R
Yes
Yes
CapRecDwide
Boolean /R
Yes
Yes
CapRecDhighDwide
Boolean /R
Yes
Yes
CapRecEmptySensor
Boolean /R
Yes
Yes
CapRecItalic
Boolean /R
No
No
CapRecLeft90
Boolean /R
Yes
Yes
CapRecMarkFeed
Long /R
Yes
Yes
CapRecNearEndSensor
Boolean /R
No
No
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
25
26
Type/Access
Name
Supported for
Zebra ZPL
Printer
Supported for
Zebra CPCL
Printer
CapRecPapercut
Boolean /R
Yes
Yes
CapRecRight90
Boolean /R
Yes
Yes
CapRecRotate180
Boolean /R
Yes
Yes
CapRecStamp
Boolean /R
No
No
CapRecUnderline
Boolean /R
Yes
Yes
CapRecPageMode
Boolean /R
Yes
Yes
CapSlpPageMode
Boolean /R
No
No
CapSlpPresent
Boolean /R
No
No
CapSlpFullslip
Boolean /R
No
No
CapSlp2Color
Boolean /R
No
No
CapSlpBarCode
Boolean /R
No
No
CapSlpBitmap
Boolean /R
No
No
CapSlpBold
Boolean /R
No
No
CapSlpBothSidesPrint
Boolean /R
No
No
CapSlpCartridgeSensor
Long /R
No
No
CapSlpColor
Long /R
No
No
CapSlpDhigh
Boolean /R
No
No
CapSlpDwide
Boolean /R
No
No
CapSlpDhighDwide
Boolean /R
No
No
CapSlpEmptySensor
Boolean /R
No
No
CapSlpItalic
Boolean /R
No
No
CapSlpLeft90
Boolean /R
No
No
CapSlpNearEndSensor
Boolean /R
No
No
CapSlpRight90
Boolean /R
No
No
CapSlpRotate180
Boolean /R
No
No
CapSlpUnderline
Boolean /R
No
No
AsyncMode
Boolean /R/W
Yes
Yes
CartridgeNotify
Long /R/W
Yes
Yes
CharacterSet
Long /R/W
Yes
Yes
CharacterSetList
String /R
Yes
Yes
CoverOpen
Boolean /R
No
No
ErrorLevel
Long /R
Yes
Yes
ErrorStation
Long /R
Yes
Yes
ErrorString
String /R
Yes
Yes
FontTypefaceList
String /R
Yes
Yes
FlagWhenIdle
Boolean /R/W
No
No
MapCharacterSet
Boolean /R/W
No
No
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Type/Access
Name
Supported for
Zebra ZPL
Printer
Supported for
Zebra CPCL
Printer
MapMode
Long /R/W
Yes
Yes
PageModeArea
String /R/W
Yes
Yes
PageModeDescriptor
Int32 R/W
Yes
Yes
PageModeHorizontalPosition
Int32 R/W
Yes
Yes
PageModePrintArea
String /R/W
Yes
Yes
PageModePrintDirection
Int32 R/W
Yes
Yes
PageModeStation
Int32 R/W
Yes
Yes
PageModeVerticalPosition
Int32 R/W
Yes
Yes
RotateSpecial
Long /R/W
Yes
Yes
JrnLineChars
Long /R/W
Yes
Yes
JrnLineCharsList
String /R
Yes
Yes
JrnLineHeight
Long /R/W
Yes
Yes
JrnLineSpacing
Long /R/W
Yes
Yes
JrnLineWidth
Long /R
Yes
Yes
JrnLetterQuality
Boolean /R/W
Yes
Yes
JrnEmpty
Boolean /R
Yes
Yes
JrnNearEnd
Boolean /R
Yes
Yes
JrnCartridgeState
Long /R
Yes
Yes
JrnCurrentCartridge
Long /R/W
Yes
Yes
RecLineChars
Long /R/W
Yes
Yes
RecLineCharsList
String /R
Yes
Yes
RecLineHeight
Long /R/W
Yes
Yes
RecLineSpacing
Long /R/W
Yes
Yes
RecLineWidth
Long /R
Yes
Yes
RecLetterQuality
Boolean /R/W
Yes
Yes
RecEmpty
Boolean /R
No
No
RecNearEnd
Boolean /R
No
No
RecSidewaysMaxLines
Long /R
Yes
Yes
RecSidewaysMaxChars
Long /R
Yes
Yes
RecLinesToPaperCut
Long /R
Yes
Yes
RecBarCodeRotationList
String /R
Yes
Yes
RecBitmapRotationList
String /R
No
No
RecCartridgeState
Long /R
Yes
Yes
RecCurrentCartridge
Long /R/W
Yes
Yes
SlpLineChars
Long /R/W
No
No
SlpLineCharsList
String /R
No
No
SlpLineHeight
Long /R/W
No
No
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
27
28
Type/Access
Name
Supported for
Zebra ZPL
Printer
Supported for
Zebra CPCL
Printer
SlpLineSpacing
Long /R/W
No
No
SlpLineWidth
Long /R
No
No
SlpLetterQuality
Boolean /R/W
No
No
SlpEmpty
Boolean /R
No
No
SlpNearEnd
Boolean /R
No
No
SlpSidewaysMaxLines
Long /R
No
No
SlpSidewaysMaxChars
Long /R
No
No
SlpMaxLines
Long /R
No
No
SlpLinesNearEndToEnd
Long /R
No
No
SlpBarCodeRotationList
String /R
No
No
SlpBitmapRotationList
String /R
No
No
SlpPrintSide
Long /R
No
No
SlpCartridgeState
Long /R
No
No
SlpCurrentCartridge
Long /R/W
No
No
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Supported for
Zebra CPCL
Printer
PrintNormal
Yes
Yes
PrintTwoNormal
No
No
PrintImmediate
Yes
Yes
PrintMemoryBitmap
Yes
Yes
BeginInsertion
No
No
EndInsertion
No
No
BeginRemoval
No
No
ClearPrintArea
Yes
Yes
EndRemoval
No
No
CutPaper
Yes
Yes
RotatePrint
Yes
Yes
PrintBarCode
Yes
Yes
PrintBitmap
Yes
Yes
TransactionPrint
Yes
Yes
ValidateData
Yes
Yes
SetBitmap
Yes
Yes
SetLogo
Yes
Yes
ChangePrintSide
No
No
MarkFeed
Yes
Yes
PageModePrint
Yes
Yes
Name
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
29
30
Summary of Events
Table 6 Events
Supported for
Zebra ZPL
Printer
Supported for
Zebra CPCL
Printer
Name
DataEvent
Not Supported
No
No
DirectIOEvent
Yes
Yes
ErrorEvent
Yes
Yes
OutputCompleteEvent
Yes
Yes
StatusUpdateEvent
Yes
Yes
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
5
Device Manager
This chapter provides information about the Device Manager and its uses.
Contents
Using the Device Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using Bluetooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using an IP Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using a Parallel Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using a Serial Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Using a USB Cable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a KR403 Kiosk Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Font Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a New Font in Device Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assigning Multiple Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deleting a Font. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Tips For Using Additional ZPL Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Use of OPOS Character Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
KR403 Specific User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Kiosk Printer Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Kiosk Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Details for Variable Continuous Mode vs. Continuous Mode . . . . . . . . . . . . . . . . . . . .
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
32
34
35
36
37
38
39
39
41
44
45
45
48
49
50
52
53
53
53
55
P1014152-002 Rev. A
32
Device Manager
Using the Device Manager
2. When the program displays, click on the "Add" icon. The General tab is used to add a
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Using the Device Manager
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
33
34
Device Manager
Using the Device Manager
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Using the Device Manager
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
35
36
Device Manager
Using the Device Manager
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Using the Device Manager
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
37
38
Device Manager
Using the Device Manager
This will populate the Available Printer(s) area with found printers.
Example USB cable configuration
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Configuration Settings
Configuration Settings
Adding a Printer
1. On the Configurations Settings tab, select the settings that will be used for the printer.
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
39
40
Device Manager
Configuration Settings
3. A message will appear asking if you are sure you want to add the printer, click Yes.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Configuration Settings
Add Button.
2. Select KR403 from the Printer Model drop-down menu and type in the logical device
name.
3. Click Next.
4. In the Communication Interfaces tab, select the Port Type and then click the Next button.
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
41
42
Device Manager
Configuration Settings
5. In the Configuration Settings tab, select the settings such as Media Type, Tracking Mode,
etc. Check the Enable Audit Log box to enable event logging.
6. Click the Next button and configure the Kiosk Printer Settings.
For a detailed explanation of the Kiosk Printer Settings, see Kiosk Printer Settings
on page 53.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Configuration Settings
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
43
44
Device Manager
Configuration Settings
Output Logging
The Driver can log its printer command output for troubleshooting purposes. By default, this
option is not turned on to keep the logs from consuming disk space. In the event that the
Output Logs are needed, the feature can be activated from within the Device Manager.
Note If logging is turned off or on while a printer is in the "Claimed" state, the setting
change will not take effect until the printer has been "Released".
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Additional Font Handling
monospaced font called Mono1 and a scalable font called Swiss721. Please contact your
Zebra Reseller to obtain these fonts.
Note Zebra offers a pre-converted fonts for use with CPCL-based printers. This is a
monospaced font called Mono1. Please contact your Zebra Reseller to obtain this font. As
a convenience, Mono1 is predefined as an Additional Font for the CPCL printer models.
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
45
46
Device Manager
Additional Font Handling
3. Select Character Set drop-down menu, verify selectable character sets (100, 101, 102, 103,
104, 105, 106, 107, 108, 109, 110, 113, 128, 129, 130) and select the character sets by
clicking the corresponding boxes.
4. Enter Font Name, Font Height, and Width (in dots). If adding Swiss721, use the name
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Additional Font Handling
(The user will be presented with a dialog box to confirm the adding of the font.)
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
47
48
Device Manager
Additional Font Handling
Note When using One Shot ESC commands, the index entry for the font will be assigned
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Additional Font Handling
Deleting a Font
1. To delete a font from the list, simply right-click the Font you wish to delete and select
Delete Font.
(The user will be presented with a dialog box to confirm the deletion of the font.)
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
49
50
Device Manager
Programming Tips For Using Additional ZPL Fonts
OPOS
CharacterSet
Value
100
101
102
103
104
105
106
107
108
109
110
113 (default)
128
129
130
Note If printing with a new font and character set shall occur, perform the steps in the
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
Programming Tips For Using Additional ZPL Fonts
If using Swiss721 font (with font index 3), perform the steps below.
1. Send the ESC|3fT. With the first use, the CharacterSetNumber value (128,129,130)
(assigned to the Swiss721 font) will be appended to the default CharacterSetList property
(100,101,102,103,104,105,106,107,108,109,110,113).
This will throw an exception as Selected Font doesn't support character set. You will
need to add the appropriate character set number within 128,129,130.
2. Assign the CharacterSetNumber within the CharacterSetNumber value (128,129,130)
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
51
52
Device Manager
Use of OPOS Character Properties
100,101,102,103,104,105,106,107,108,109,110,113.
If a new font is added, the new character set values will be added to the CharacterSetList so
an application can choose the new values for the respective fonts.
The CharacterSet property will initialize with 113 on open.
The CapMapCharacterSet property will be initialized with FALSE on open.
Note The above setting has the effect that the MapCharacterSet property will also always
show FALSE regardless of what the user sets it to. If MapCharacterSet is set to TRUE, an
error E_ILLEGAL will be thrown.
The CapCharacterSet property will initialize with DISP_CCS_ASCII on open. This
property will change with a different selection of the CharacterSet property.
CapCharacterSet
CharacterSet
DISP_CCS_ASCII
100-110, 113
DISP_CCS_UNICODE
128,129,130
Note Error handling - If a specific character set value is selected with the CharacterSet
property and a font is selected that cannot support the character set, an error E_ILLEGAL
will be thrown.
Note OPOS Properties - The driver does not support font mapping. The application is
responsible for this task. CapMapCharacterSet is always FALSE, which will also cause
MapCharacterSet to always be FALSE. If MapCharacterSet is set to TRUE, an error
E_ILLEGAL will be thrown.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
KR403 Specific User Interface
Kiosk Properties
New Page:
There are three settings which you may select when a new page is printed:
Eject Upon New Page
Retract Upon New Page
Do Nothing
These settings instruct the printer to change the presenter function mode.
Eject Upon New Page Ejects the current page while the new page is printed.
Retract Upon New Page Retracts current page while the new page is printed.
Do Nothing The current page still remains in the printer neither ejects nor retracts.
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
53
54
Device Manager
KR403 Specific User Interface
Current Page:
Retract upon Timeout If a label is not taken, you can define a timeout value when
expired will retract the current page. Retract timeout can be defined from 0 300 seconds.
Clear Presenter Will eject the current page before printing a new page.
Kiosk Values:
Uncut Amount When a partial cut is made by the printer, the media left uncut can be
defined from 10 to 60mm.
Cut Margin This setting determines the margin between the cutter and the printhead. It is
defined from 2 to 9mm. The default is 9mm.
Presenter Loop Length Determines the length of the presenter loop. It is defined from 3
to 1023mm. The default gives a loop of approximately 400mm.
With this feature, we build a loop with the imaged receipt and keep the printout in the printer
to prevent the kiosk user from taking the receipt while it is still being imaged. When the full
receipt is imaged, we cut the receipt and present a portion of the receipt to the user for them to
take. This reduces jamming and print image distortion of the receipt.
Present Length Determines the amount of media to eject the page through the presenter
module.
When the customer takes the receipt, the printer detects a movement and issues the rest of the
receipt at 300 mm/s to help ensure receipt is removed undamaged. Value range from 0 to
255mm.
Kiosk Wall Compensation By default, the printer will eject the paper 50 mm during a
present cycle. The kiosk wall compensation setting allows the user to increase the distance that
media is ejected during a present cycle. The additional distance can range from 0 to 255 mm.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
KR403 Specific User Interface
Variable continuous mode will print on continuous paper without page boundaries until a
cut command is issued.
Continuous mode requires a defined page length and will print a page that adheres to that
set page length.
Continuous Mode
Example Continuous Mode:
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
55
56
Device Manager
KR403 Specific User Interface
In this example, the minimum label length is not exceeded and is not different from
Continuous mode.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Device Manager
KR403 Specific User Interface
printer shall not feed to the end of the page and cut right after the last print.
In this example, only the minimum page length is honored and after the minimum length is
exceeded the printer can cut at any location after the last print statement.
Implementation
To begin printing in variable continuous mode, we need to issue PrintNormal statements until
the minimum page length is exceeded and the cut command is received.
This means we have to establish a hybrid. Using page mode and continuous mode, you will set
up a requirement to cut at any location (other the end of the page), once the minimum page
length is exceeded.
Note This requirement is introduced due to a change in the original firmware behavior to
When using variable mode, you need to also set a minimum page length in order to accomplish
the desired effect. In this mode, the printer is feeding paper without length limitation (besides
the minimum presenter length).
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
57
58
Device Manager
KR403 Specific User Interface
Notes ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
6
Test Application
This chapter provides steps and illustrations to prepare your keyboard to use additional
languages and to launch and perform various operations using the OPOS Test Application.
Contents
Preparing Windows and Printer for Unicode Printing . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Zebra OPOS Test Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Printing Unicode with the Test Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
60
Test Application
Preparing Windows and Printer for Unicode Printing
have Administrative rights, you may need to seek assistance from your IT organization.
1. Navigate to the Control Panel and click on Regional and Language Options.
2. Click the Languages tab and check both boxes under Supplemental language support.
If you do not have the CD, it will be necessary to obtain it from your IT Administrator.
The installation will take a few minutes and a reboot will be required.
4. Once the system has rebooted, navigate to the Control Panel and open Regional and
Language Options.
5. Click the language tab and click the Details button under Text services and input
languages.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Test Application
Preparing Windows and Printer for Unicode Printing
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
61
62
Test Application
Zebra OPOS Test Application
2. From the Printer Open section, choose a Printer Language from the Service Object Type
drop-down menu.
3. Choose CPCL or ZPL.
4. Select a printer in the Printer Logical Name drop-down menu.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Test Application
Zebra OPOS Test Application
5. To gain exclusive access to the device, click the Open button, click the Claim button, and
On the next pages, two methods to run a test print are described.
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
63
64
Test Application
Zebra OPOS Test Application
Test One:
Example Test one:
1. Type some data into the Print Data field.
2. Click on the Print Normal button found in the Print Options area then click the Mark
Feed button.
The printer will print the contents from the Print Data field.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Test Application
Zebra OPOS Test Application
Test Two:
Example Test two:
1. Type some data into the Data field in the Barcode Print area.
2. Then select Code 39 from the drop-down menu next to Symbology.
3. Now click on Print from the Barcode area and Mark Feed in the Print Options area.
The printer will print the Code39 barcode and the data entered in the Data area.
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
65
66
Test Application
Printing Unicode with the Test Application
3. Select the new font by sending the correct OPOS one-shot command (example: ESC|3fT).
4. Type the one-shot command in the Print Data field and click the Print Normal button.
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011
Test Application
Printing Unicode with the Test Application
5. Change the Character Set value (Default is 113) by entering the correct Character Set
value in the Character Set Number box, and then click the Set CharacterSet button below.
The user will get a message showing that the Character Set was updated.
06/13/2011
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
P1014152-002 Rev. A
67
68
Test Application
Printing Unicode with the Test Application
Notes ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1014152-002 Rev. A
ZPL & CPCL Printer Driver for OPOS Application Programmers Guide
06/13/2011