Zebra ZD500 Desktop Printer ZPL & CPCL Printer Driver for OPOS Application Programmer’s Guide (en)

ZPL & CPCL PRINTER DRIVER FOR OPOS
Application Programmer’s Guide
P1014152-17EN
ZEBRA and the stylized Zebra head are trademarks of Zebra Technologies Corporation, registered in many jurisdictions worldwide. All other trademarks are the property of their respective owners. © 2022 Zebra Technologies Corporation and/or its affiliates. All rights reserved.
Information in this document is subject to change without notice. The software described in this document is furnished under a license agreement or nondisclosure agreement. The software may be used or copied only in accordance with the terms of those agreements.
For further information regarding legal and proprietary statements, please go to:
SOFTWARE:http://www.zebra.com/linkoslegal COPYRIGHTS:http://www.zebra.com/copyright WARRANTY:http://www.zebra.com/warranty END USER LICENSE AGREEMENT: http://www.zebra.com/eula
Terms of Use
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.
Product Improvements
Continuous improvement of products is a policy of Zebra Technologies. All specifications and designs are subject to change without notice.
Liability Disclaimer
Zebra Technologies takes steps to ensure that its published Engineering specifications and manuals are correct; however, errors do occur. Zebra Technologies reserves the right to correct any such errors and disclaims liability resulting therefrom.
Limitation of Liability
In no event shall Zebra Technologies 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 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.
Publication Date
April 28, 2022
2

About This Document

Who Should Use This Document

The manual is targeted to an application developer who requires access to POS-specific peripheral devices.

OPOS Web Sites

Refer to the following web sites for Open Point of Service (OPOS) information:
Reference implementation — Common Control Objects: http://monroecs.com/opos.htm

How This Document Is Organized

The Application Programmer’s Guide is set up as follows:
OPOS Information on page 7
Supported Bar Codes and Fonts on page 9
Supported Specifications and Printers on page 14
Common Properties, Methods, and Events on page 16
Driver Installation on page 28
Device Manager on page 34
Test Application on page 62
ZPL Fonts and Bar Codes on page 70
3

Contents

About This Document ........................................................................................................................ 6
Who Should Use This Document..................................................................................... 6
OPOS Web Sites ............................................................................................................. 6
How This Document Is Organized ................................................................................... 6
OPOS Information............................................................................................................................... 7
OLE for Retail POS Controls............................................................................................ 7
How an Application Uses an OPOS Control .................................................................... 7
Summary......................................................................................................................... 8
Supported Bar Codes and Fonts....................................................................................................... 9
Supported Bar Codes....................................................................................................... 9
Supported ZPL Fonts..................................................................................................... 10
Font D..................................................................................................................... 10
Example Command.......................................................................................... 10
Printed Image................................................................................................... 11
Font F ..................................................................................................................... 11
Example Command.......................................................................................... 11
Printed Image................................................................................................... 11
Font A ..................................................................................................................... 11
Example Command.......................................................................................... 11
Printed Image................................................................................................... 11
Supported CPCL Fonts.................................................................................................. 12
Font for Typeface 0 ................................................................................................ 12
Example Command.......................................................................................... 12
Printed Image................................................................................................... 12
Font for Typeface 1 ................................................................................................ 12
Example Command.......................................................................................... 12
Printed Image................................................................................................... 12
Font for Typeface 2 ................................................................................................ 13
Example Command.......................................................................................... 13
4
Contents
Printed Image................................................................................................... 13
Supported Specifications and Printers .......................................................................................... 14
Specifications Supported ............................................................................................... 14
Supported Operating Systems....................................................................................... 14
Supported Printers ........................................................................................................ 15
Common Properties, Methods, and Events ................................................................................... 16
Summary of Common Properties................................................................................... 16
Summary of Common Methods ..................................................................................... 17
Summary of Common Events ........................................................................................ 17
Summary of Specific Properties..................................................................................... 18
Summary of Specific Methods ...................................................................................... 22
Summary of Events........................................................................................................ 23
Data Characters and Escape Sequences...................................................................... 23
In-line Barcode Printing.................................................................................................. 25
Driver Installation ............................................................................................................................. 28
OPOS Driver Installation................................................................................................ 28
OPOS Driver Silent Installation..................................................................................... 32
Add Printer Via Command Line .............................................................................. 32
Device Manager ................................................................................................................................ 34
Using the Device Manager............................................................................................. 34
Connecting Using Bluetooth........................................................................................... 36
Connecting Using an IP Address .................................................................................. 37
Connecting Using a Parallel Cable ............................................................................... 38
Connecting Using a Parallel Cable for 64-Bit Machines......................................... 39
Connecting Using a Serial Cable .................................................................................. 42
Connecting Using a USB Cable.................................................................................... 43
Configuration Settings.................................................................................................... 44
Adding a Printer...................................................................................................... 44
Adding a KR403 Kiosk Printer ................................................................................ 45
Output Logging ....................................................................................................... 47
Additional Font Handling............................................................................................... 48
Adding a New Font in Device Manager .................................................................. 48
Assigning Multiple Fonts......................................................................................... 51
Deleting a Font ....................................................................................................... 51
Selecting and Using a Font with Chinese Characters ............................................ 51
5
Contents
Setting the Printer Font Information ................................................................. 51
Testing the New Font ....................................................................................... 54
Programming Tips For Using Additional ZPL Fonts....................................................... 55
Use of OPOS Character Properties ............................................................................... 56
KR403 Specific User Interface....................................................................................... 57
Kiosk Printer Settings ............................................................................................. 57
Kiosk Properties ..................................................................................................... 58
New Page:........................................................................................................ 58
Current Page:................................................................................................... 58
Kiosk Values: ................................................................................................... 58
Details for Variable Continuous Mode vs. Continuous Mode ................................. 59
Continuous Mode ............................................................................................. 59
Variable Continuous Mode 2............................................................................ 60
Implementation................................................................................................. 61
Test Application................................................................................................................................ 62
Preparing Windows and Printer for Unicode Printing..................................................... 62
Zebra OPOS Test Application........................................................................................ 63
Printing Unicode with the Test Application.................................................................... 69
ZPL Fonts and Bar Codes................................................................................................................ 70
Standard Printer Fonts................................................................................................... 70
Proportional and Fixed Spacing..................................................................................... 71
Scalable Versus Bitmapped Fonts................................................................................. 72
Scalable Fonts........................................................................................................ 72
Bitmapped Fonts .................................................................................................... 73
Magnification Factor......................................................................................... 73
Changing Bitmapped Font Size ....................................................................... 73
Font Matrices ................................................................................................................. 74
Bar Codes ..................................................................................................................... 77
Basic Format for Bar Codes ................................................................................... 78
Bar Code Field Instructions .................................................................................... 78
Bar Code Command Groups .................................................................................. 80
6

OPOS Information

OLE for Retail POS Controls

The goal of this document is to provide an overview and programming guide for the Zebra ZPL & CPCL Printer Driver for OPOS driver implementation.

How an Application Uses an OPOS Control

The first action the application must take on the Control is to call its Open method. The parameter for this method selects a device name to associate with the Control. The Open method performs the following steps:
Establishes a link to the device name that, in our case, is the Windows
Initializes the properties OpenResult, Claimed, DeviceEnabled, DataEventEnabled, FreezeEvents,
AutoDisable, DataCount, and BinaryConversion, as well as descriptions and version number of the OPOS Control layers. Additional class-specific properties may also be initialized.
Several applications may have an OPOS Control open at the same time. Therefore, after the device is opened, the application will need to call the ClaimDevice method to gain exclusive access to the device. The device must be claimed before the Control allows access to its methods and properties. Claiming the device ensures that other applications do not interfere with the use of the device. The application may call the ReleaseDevice method when the device can be shared by other applications—for instance, at the end of a transaction.
®
printer driver name.
Before using the device, the application must set the DeviceEnabled property to TRUE. This value brings the device to an operational state, while FALSE disables the device.
After the application has finished using the device, the DeviceEnabled property should be set to FALSE, then the ReleaseDevice method, and finally the Close method should be called to release the device and associated resources. Before exiting, an application should close all open OPOS Controls.
7

Summary

OPOS Information
In summary, the application follows this general sequence:
Open method: Call to link the Control Object to the Service Object.
ClaimDevice method: Call to gain exclusive access to the device. Required for exclusive-use devices;
optional for some sharable devices.
DeviceEnabled property: Set to TRUE to make the device operational.
Use the device.
DeviceEnabled property: Set to FALSE to disable the device.
ReleaseDevice method: Call to release exclusive access to the device.
Close method: Call to release the Service Object from the Control Object.
8

Supported Bar Codes and Fonts

Supported Bar Codes

Barcode Symbology Supported in ZPL Supported in CPCL
Codabar Yes Yes
Code 128 Yes Yes
* Code 128 Parsed Yes Yes
Code 39 Yes Yes
Code 93 Yes Yes
DataMatrix
* EAN 128 Yes Yes
* EAN 13s
* EAN 8S
EANJan 13 Yes Yes
EANJan 8 Yes Yes
ltf Yes Yes
* Maxicode Yes Yes
* PDF417 Yes Yes
QRCode
* GS1DataBar Yes Yes
* GS1DataBarExpanded Yes Yes
TF Yes No
UPC-A Yes Yes
* UPC-AS
NOTES: *Identifies those Barcodes that have no center and right alignments, and the driver will return E_ILLEGAL when used with PTR_BC_CENTER or PTR_BC_RIGHT.
1) Supports the UPCA with a 5-digit extension for the CPCL firmware.
2) Supports the UPCE with a 5-digit extension for the CPCL firmware.
3) Supports the EAN-x with a 5-digit extension for the CPCL firmware.
Properties for 2D barcodes:
4) DataMatrix barcode parameters should be in the following range: Width: 1; Height : <= 30 (depending on width of printer); Alignment: left, center, or right; Text Position: above, below, or none
5) QRCode parameters should be in the following range: Width: 1 < 10; Height: 2 <= 10; Alignment: left, center, or right; Text Position: Below
4
3
3
5
1
Yes No
Yes Yes
Yes Yes
Yes No
Yes Yes
9
Supported Bar Codes and Fonts
Barcode Symbology Supported in ZPL Supported in CPCL
UPC-D No No
UPC-D2 No No
UPC-D3 No No
UPC-D4 No No
UPC-D5 No No
* OCR-A Yes Yes
OCR-B No No
UPC-E Yes Yes
* UPC-ES
NOTES: *Identifies those Barcodes that have no center and right alignments, and the driver will return E_ILLEGAL when used with PTR_BC_CENTER or PTR_BC_RIGHT.
1) Supports the UPCA with a 5-digit extension for the CPCL firmware.
2) Supports the UPCE with a 5-digit extension for the CPCL firmware.
3) Supports the EAN-x with a 5-digit extension for the CPCL firmware.
2
Yes Yes
Properties for 2D barcodes:
4) DataMatrix barcode parameters should be in the following range: Width: 1; Height : <= 30 (depending on width of printer); Alignment: left, center, or right; Text Position: above, below, or none
5) QRCode parameters should be in the following range: Width: 1 < 10; Height: 2 <= 10; Alignment: left, center, or right; Text Position: Below

Supported ZPL Fonts

Font Typeface
(Value for # in
ESC|#fT)
0 D 18 x 10 24 2 12
1 F 26 x 13 30 3 16
2 A 9 x 5 12 1 6

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"
Font Name
Font Size
(h x w)
Line
Height
Inter-Character
Gap (dots)
Total Width
(dots)
10
Printed Image

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"
Supported Bar Codes and Fonts
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
11

Supported CPCL Fonts

Supported Bar Codes and Fonts
Font Typeface
(Value for # in
ESC|#fT)
0 7 0 (24 x 12) 24 12
1 0 3 (18 x 16) 18 16
2 Mono1* 0 (24 x 12) 24 12
Note: You must install the Mono1 font. If you do not install this font, you will not receive a printout.

Font for Typeface 0

The Font for typeface 0 will be CPCL font 7. 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 10 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 "0987654321abcdefghijklmnopqrstuvwxyz6543210987654321098765432109876" PrintNormal "1234567890123456789012345678901234567890123456789012345678901234567" PrintNormal "0987654321098765432109876543210987654321098765432109876543210987654"
Font Name
Font Size
(h x w)
Line Height Total Width (dots)
Printed Image

Font for Typeface 1

The spacing between lines shall be 28 dots. Counting the inter-character gap of 2 dots, the characters are 14 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
12

Font for Typeface 2

The Font for Typeface 2 will be Mono1. The spacing between lines shall be 24 dots. The character width shall be 12 dots. This amounts to approximately 43 charters on a 3 inch printhead depending on the actual print width in dots.
Example Command
PrintNormal "ESC|2fT1234567890123456789012345678901234567890123456789012" PrintNormal "ESC|2fT0987654321098765432109876543210987654321098765432109" PrintNormal "ESC|2fT1234567890123456789012345678901234567890123456789012" PrintNormal "ESC|2fT0987654321098765432109876543210987654321098765432109"
Printed Image
Supported Bar Codes and Fonts
13

Supported Specifications and Printers

Specifications Supported

UPOS specification supported: v1.14
ActiveX supported
The Common Control Objects (CCO) must be installed from http://monroecs.com/opos.htm for
ActiveX to work.
.NET framework supported: v4.8
Use of Microsoft POS for .NET v1.14

Supported Operating Systems

Windows 10 (32 bit and 64 bit)
Windows 11
14
Supported Specifications and Printers

Supported Printers

Table 1 Supported Printer Models (Alphabetical Order)
#’s -QL RW-ZQ ZQ-ZT
105SL (203 dpi, 300 dpi)
110PAX4 (203 dpi, 300 dpi)
110XiIIIPlus (203 dpi, 300 dpi, 600 dpi)
140XiIIIPlus
170PAX4 (203 dpi, 300 dpi)
170XiIIIPlus (203 dpi, 300 dpi)
220XiIIIPlus (203 dpi, 300 dpi)
EZ320
GC420d (ZPL)
GC420t (ZPL)
GK420d
GK420t
GK888d
GK888t
GT800 (203 dpi, 300 dpi, ZPL)
GX420d
GX420s
GX420t
GX430t
iMZ220 (ZPL/CPCL)
iMZ320 (ZPL/CPCL)
KR403
LP 2824 Plus (ZPL)
LP 2824-Z
LP 2844-Z
MZ 220
MZ 320
QL 220 Plus
QL 320 Plus
QL 420 Plus
QLn220 (ZPL/CPCL)
QLn320 (ZPL/CPCL)
QLn420 (ZPL/CPCL)
RW 220
RW 420
S4M (203 dpi, 300 dpi)
TLP 2824 Plus (ZPL)
TLP 2824-Z (203 dpi)
TLP 2844-Z (203 dpi)
TLP 3844-Z (300 dpi)
ZD220 (ZPL)
ZD230 (ZPL)
ZD410 (203 dpi, 300 dpi, ZPL)
ZD411 (203 dpi, 300 dpi, ZPL)
ZD420 (203 dpi, 300 dpi, ZPL)
ZD421 (203 dpi, 300 dpi, ZPL)
ZD500 (203 dpi, 300 dpi, ZPL)
ZD500R (203 dpi, 300 dpi, ZPL)
ZD611 (203 dpi, 300 dpi, ZPL)
ZD611R (203 dpi, 300 dpi, ZPL)
ZD620 (203 dpi, 300 dpi, ZPL)
ZD621 (203 dpi, 300 dpi, ZPL)
ZD621R (203 dpi, 300 dpi, ZPL)
ZD888 (ZPL)
ZE500-4 (203 dpi, 300 dpi, ZPL)
ZE500-6 (203 dpi, 300 dpi, ZPL)
ZE500R-4 (203 dpi, 300 dpi, ZPL)
ZM400 (203 dpi, 300 dpi, 600 dpi)
ZM600 (203 dpi, 300 dpi)
ZQ112 (CPCL)
ZQ120 (CPCL)
ZQ210 (CPCL)
ZQ220 (CPCL)
ZQ310 (ZPL/CPCL)
ZQ320 (ZPL/CPCL)
ZQ510 (ZPL/CPCL)
ZQ511 (ZPL,CPCL)
ZQ511R (ZPL)
ZQ520 (ZPL/CPCL)
ZQ521 (ZPL,CPCL)
ZQ521R (ZPL)
ZQ610 (ZPL/CPCL)
ZQ620 (ZPL/CPCL)
ZQ630 (CPCL, ZPL)
ZQ630R (ZPL)
ZR118 (CPCL)
ZR138 (CPCL)
ZR318(ZPL/CPCL)
ZR328 (ZPL/CPCL)
ZR338 (ZPL/CPCL)
ZR628 (ZPL/CPCL)
ZR638 (ZPL/CPCL)
ZR658 (ZPL/CPCL)
ZR668 (ZPL/CPCL)
ZT210 (203 dpi, 300 dpi, ZPL)
ZT220 (203 dpi, 300 dpi, ZPL)
ZT230 (203 dpi, 300 dpi, ZPL
ZT410 (203 dpi, 300 dpi, 600 dpi, ZPL)
ZT410R (203 dpi, 300 dpi, 600 dpi, ZPL)
ZT411 (203 dpi, 300 dpi, 600 dpi, ZPL)
ZT411R (203 dpi, 300 dpi, 600 dpi, ZPL)
ZT420 (203 dpi, 300 dpi, ZPL)
ZT420R (203 dpi, 300 dpi, ZPL)
ZT421 (203 dpi, 300 dpi, ZPL)
ZT421R (203 dpi, 300 dpi, ZPL
ZT510 (203 dpi, 300 dpi, ZPL)
ZT610 (203 dpi, 300 dpi, 600 dpi, ZPL)
ZT610R (203 dpi, 300 dpi, 600 dpi, ZPL)
ZT620 (203 dpi, 300 dpi, ZPL)
ZT620R (203 dpi, ZPL)
15

Common Properties, Methods, and Events

This section provides the common and specific commands for properties, methods, and events.

Summary of Common Properties

Name Type/Access
AutoDisable Boolean /R/W No No
CapCompareFirmwareVersion Boolean /R No No
BinaryConversion Long R/W No No
CapPower Reporting Long /R Yes Yes
CapStatisticsReporting Boolean /R Yes 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 Yes Yes
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
Supported for Zebra
ZPL Printer
Supported for Zebra
CPCL Printer
16
Common Properties, Methods, and Events
Name Type/Access
ServiceObjectVersion Long /R Yes Yes
DeviceDescription String /R Yes Yes
DeviceName String /R Yes Yes

Summary of Common Methods

Name
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
*Note: The status check has been moved from the Open to the Claim function, which also implies that the driver will always open even if the printer has an error or is not there.
Supported for Zebra
ZPL Printer
Supported for Zebra
ZPL Printer
Supported for Zebra
CPCL Printer
Supported for Zebra
CPCL Printer

Summary of Common Events

Name
DataEvent No No
DirectIOEvent Yes Yes
ErrorEvent Yes Yes
OutputCompleteEvent Yes Yes
StatusUpdateEvent Yes Yes
17
Supported for Zebra
ZPL Printer
Supported for Zebra
CPCL Printer
Common Properties, Methods, and Events

Summary of Specific Properties

Name Type/Access
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 Yes Yes
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 No No
CapRecPresent Boolean /R Yes Yes
CapRec2Color Boolean /R Yes Yes
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
CapRecPapercut Boolean /R Yes Yes
CapRecRight90 Boolean /R Yes Yes
CapRecRotate180 Boolean /R Yes Yes
Supported for
Zebra ZPL Printer
Supported for
Zebra CPCL
Printer
18
Common Properties, Methods, and Events
Name Type/Access
CapRecStamp Boolean /R No No
CapRecUnderline Boolean /R No No
CapRecPageMode Boolean /R Yes Yes
CapRecRuledLine Int32 No No
CapSlpPageMode Boolean /R No No
CapSlpRuledLIne Int32 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
MapMode* See the NOTE Regarding MapMode:
on page 21.
Long /R/W Yes Yes
Supported for
Zebra ZPL Printer
Supported for
Zebra CPCL
Printer
19
Common Properties, Methods, and Events
Name Type/Access
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
SlpLineSpacing Long /R/W No No
SlpLineWidth Long /R No No
SlpLetterQuality Boolean /R/W No No
Supported for
Zebra ZPL Printer
Supported for
Zebra CPCL
Printer
20
Common Properties, Methods, and Events
Name Type/Access
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
NOTE Regarding MapMode:
In the Zebra SO, MapMode applies only to RecLineCharsList settings.
Supported for
Zebra ZPL Printer
Supported for
Zebra CPCL
Printer
The following properties may get changed:
RecLineChars, RecLineHeight, RecLineSpacing
RecLineWidth, RecSidewaysMaxChars, RecSidewaysMaxLines
RecLinesToPaperCut
The following properties are not changed:
PageModeArea property
PageModePrintArea property
PageModeHorizontalPosition
PageModeVerticalPosition
Barcode printing: printBarcode
Due to the nature of the printer barcodes and how they are generated and printed Zebra allows only
specific DOT values for barcode width and height as outlined in the barcode notes.
Bitmap printing: printBitmap
The width of the bitmap is ignored and therefore not converted.
21
Common Properties, Methods, and Events

Summary of Specific Methods

Name
Supported for:
Zebra ZPL
Printer
Zebra CPCL
Printer
Name
Zebra ZPL
Supported for:
Printer
Zebra CPCL
Printer
PrintNormal Yes Yes RotatePrint Yes Yes
PrintTwoNormal No No PrintBarcode *‡ Yes Yes
PrintImmediate Yes Yes PrintBitmap
#
Yes Yes
PrintMemoryBitmap Yes Yes TransactionPrint Yes Yes
BeginInsertion No No ValidateData Yes Yes
EndInsertion No No SetBitmap Yes Yes
BeginRemoval No No SetLogo Yes Yes
ClearPrintArea Yes Yes ChangePrintSide No No
EndRemoval No No MarkFeed Yes Yes
CutPaper Yes Yes PageModePrint Yes Yes
DrawRuledLine No No
* NOTE: The provided OPOS constant for Data Matrix and QR code will not work with the PrintBarCode function. You must replace the provided OPOS constant BarCodeSymbology.QRCode with the custom OPOS constant BarCodeSymbology.Other and BarCodeSymbology.DataMatrix with (BarCodeSymbology.Other + 1). Additionally, to use the QR barcode, the driver uses the ^HB command, which is not supported on the KR403 printer. You need custom firmware for this feature. ‡ NOTE: The effect of the PrintBarCode width parameter depends on the Barcode symbology being used. # NOTE: The width parameter of the printBitmap method will be ignored as only the width of the actual bitmap will be taken into consideration. Therefore the Map Mode parameter will not have any effect on this function.
For the following barcodes, the width parameter, supplied in the PrintBarcode method, controls the barcode module width in dots, and must be a value between 1 and 10.
Code 39, Code 128, Code 128 parsed
Ean8s, Ean13s
EanJan8, EanJan13
ITF (Code 2 of 5)
For the following barcodes, the width parameter, supplied in the PrintBarcode method, has no effect and the barcodes print with fixed ZPL values according to the description below:
Code 93 has a fixed width as defined by the ZPL command ^BY4.
QR Code has a fixed width as defined by the ZPL command ^BY2.
Data Matrix has a fixed width as defined by the ZPL command ^BY2.
TF has a fixed width as defined by the ZPL command ^BY4.
UPCD1 to UPCD5 have a fixed width as defined by the ZPL command ^BY2.
UPCE has a fixed width as defined by the ZPL command ^BY4.
For the following barcodes, the barcode module width is calculated using the width parameter supplied in the PrintBarcode method.
Codabar
Ean128
MaxiCode
PDF417
GS1 Data Bar and GS1 Data Bar Expanded
UPCA, UPCAs
UPCEs
22

Summary of Events

Common Properties, Methods, and Events
Name May Use After
DataEvent Not Supported No No
DirectIOEvent Open, Claim & Enable Yes Yes
ErrorEvent Open, Claim & Enable Yes Yes
OutputCompleteEvent Open, Claim & Enable Yes Yes
StatusUpdateEvent Open, Claim & Enable Yes Yes

Data Characters and Escape Sequences

The default character set of all POS printers is assumed to support at least the ASCII characters 0x20 through 0x7F, which include spaces, digits, uppercase, lowercase, and some special characters. If the printer does not support lowercase characters, then the Service may translate them to uppercase.
Every escape sequence begins with the escape character, whose value is 27 decimal, followed by a vertical bar (‘|’). This is followed by zero or more digits and/or lowercase alphabetic characters. The escape sequence is terminated by an uppercase alphabetic character.
If a sequence does not begin with ESC "|", or it begins with ESC "|" but is not a valid UnifiedPOS escape sequence, the Service will make a reasonable effort to pass it through to the printer. However, not all such sequences can be distinguished from printable data, so unexpected results may occur.
The application can use the ESC|#E escape sequence to ensure more reliable handling of the amount of data to be passed through to the printer. Use of this escape sequence will make an application non-portable. The application may, however, maintain portability by performing Embedded Data Escape sequence calls within conditional code. This code may be based upon the value of the DeviceServiceDescription, the PhysicalDeviceDescription, or the PhysicalDeviceName property.
Supported for
Zebra ZPL
Printer
Supported for
Zebra CPCL
Printer
NOTE: This command sequence definition and the corresponding definition in the Point Card Reader
Writer Chapter, are the only known deviations from preserving the interchangeability of devices defined in this specification. If an application finds it necessary to utilize this command sequence, please inform the UnifiedPOS Committee with the details of its usage, so that a possible standard/generic Application Interface may be incorporated into a future release of the UnifiedPOS Standard. In order to preserve peripheral independence and interoperability at the Application level, it is the Committee’s position that this command sequence should be used only as a “last resort”.
To determine if escape sequences or data can be performed on a printer station, the application can call the validateData method. (For some escape sequences, corresponding capability properties can also be used.)
The following escape sequences are recognized. If an escape sequence specifies an operation that is not supported by the printer station, then it is ignored.
Commands, outlined in Table 2, perform the indicated action.
23
Common Properties, Methods, and Events
Table 2 Commands
Name Data Remarks ZPL Printer CPCL Printer
a
Paper cut ESC |#P Cuts receipt paper. The character '#' is replaced by an
Yes ASCII decimal string telling the percentage cut desired. If '#' is omitted, then a full cut is performed. For example: The C string "\x1B|75P" requests a 75% partial cut.
a
Feed and Paper cut
ESC |#fP Cuts receipt paper, after feeding the paper by the
RecLinesToPaperCut lines. The character '#' is
Yes
defined by the "Paper cut" escape sequence.
Feed, Paper cut, and Stamp
ESC |#sP Cuts and stamps receipt paper, after feeding the
paper by the RecLinesToPaperCut lines. The
No No
character '#' is defined by the "Paper cut" escape sequence.
Fire stamp ESC |sL Fires the stamp solenoid, which usually contains a
No No graphical store emblem.
Print bitmap ESC |#B Prints the pre-stored bitmap. The character '#' is
Yes Yes replaced by the bitmap number. See setBitmap method.
Print top logo ESC |tL Prints the pre-stored top logo. Yes Yes
Print bottom
ESC |bL Prints the pre-stored bottom logo. Yes Yes
logo
Feed lines ESC |#lF Feed the paper forward by lines. The character '#' is
Yes Yes replaced by an ASCII decimal string telling the number of lines to be fed. If '#' is omitted, then one line is fed.
Feed units ESC |#uF Feed the paper forward by mapping mode units. The
Yes Yes character '#' is replaced by an ASCII decimal string telling the number of units to be fed. If '#' is omitted, then one unit
Feed reverse ESC |#rF Feed the paper backward. The character '#' is
No No replaced by an ASCII decimal string telling the number of lines to be fed. If '#' is omitted, then one line is fed.
Pass through embedded data
ESC |#E Send the following # characters of data through to the
hardware without modifying it. The character '#' is
Yes Yes
replaced by an ASCII decimal string telling the number of bytes following the escape sequence that should be passed through as-is to the hardware.
Print in-line barcode
ESC |#R Prints the defined barcode in-line. The character '#' is
the number of characters following the R to use in the
Yes Yes
definition of the characteristics of the barcode to be printed. See details below.
Note: The QR and Data Matrix codes can be configured with the Microsoft defined constants.
Notes: a. All printers will perform only a full cut. The Kiosk printer KR403 is the only exception. You need to configure the partial cut in the Device Manager and use the Escape command to activate the partial cut in your data stream.
Yes
Yes
a
a
24
Common Properties, Methods, and Events

In-line Barcode Printing

The application can use the ESC|#R escape sequence to print barcodes in-line with other print commands. The character '#' is the number of characters following the R to use in the definition of the characteristics of the barcode to be printed.
In the data following the R, other lower case letters and numbers are used to identify different values. The same value definitions as defined for the printBarCode method headers and definitions are used for the various barcode values. Converting to string the values from the definitions are consistent.
The attribute symbols are defined as follows:
s symbology h height w width a alignment t human readable text position d start of data e end of sequence
The attributes must appear in the order specified in the above list.
Using a basic UPCA, center aligned, with bottom text, 200 dots height and ~400 dots wide, the command is as follows:
ESC|33Rs101h200w400a-2t-13d123456789012e
Commands associated with Print Mode characteristics (see Table 3) are remembered until explicitly changed.
Table 3 Print Mode Commands
Name Data Remarks ZPL Printer CPCL Printer
Font typeface selection
Commands associated with Print Line characters (see Table 4) are reset at the end of each print method, by an explicit reset (where applicable), or by a “Normal” sequence.
ESC |#fT Selects a new typeface for the
following data. Values for the character '#' are:
0 = Default typeface.
= Select first typeface from the
1 FontTypefaceList property.
= Select second typeface from the
2 FontTypefaceList property.
And so on.
Yes Yes
25
Loading...
+ 56 hidden pages