Zebra ZXP Series 8 Secure Issuance Card Printer ZMotif SDK Software Developer Reference Manual (en)

ZMotif™ SDK
P1004475-003
Software Developer
Reference Manual
k=,+&RUSDQGRULWVDIILOLDWHV$OOULJKWVUHVHUYHG=HEUDDQGWKHVW\OL]HG=HEUDKHDGDUHWUDGHPDUNVRI=,+&RUSUHJLVWHUHGLQPDQ\MXULVGLFWLRQV ZRUOGZLGH$OORWKHUWUDGHPDUNVDUHWKHSURSHUW\RIWKHLUUHVSHFWLYHRZQHUV
&RUSRUDWH+HDGTXDUWHUV
$VLD3DFLILF+HDGTXDUWHUV
 FRQWDFWDSDF#]HEUDFRP
(0($+HDGTXDUWHUV
]HEUDFRPORFDWLRQV PVHXURSH#]HEUDFRP
/DWLQ$PHULFD+HDGTXDUWHUV
KWWSZZZ]HEUDFRPORFDWLRQV

Contents

1 • Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Required Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Zebra Card Printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
ZMotif Overview Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
ZMotif Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
The ZMJ layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The ZMC layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The Windows print job sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Multiple hosts in a network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 • Software Development Kit Plus (SDK) . . . . . . . . . . . . . . . . . . . . . . . . . 5
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
SDK Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 • Graphics COM Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
GetSDKProductVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
GetSDKVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
InitGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
CloseGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
ClearGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
DrawImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
DrawEllipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
DrawFillEllipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
DrawLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
DrawRectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
P1004475-003 ZMotif SDK Software Developer Reference Manual i
Contents
DrawFillRectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
DrawFillRoundedRectangle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
DrawRoundedRectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
DrawTextRect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
DrawTextString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
CreateBitmap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
ExtractBlackData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
SetBlackExtractionLevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
ApplyColorProfile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
AdjustBrightness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
AdjustColorScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
AdjustContrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
AdjustSaturation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
AdjustGamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
ConvertToGrayScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
RotateHue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
CropImage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
SharpenImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
ImageFileToByteArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
ImageFromByteArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
IPictureFromByteArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
IntegerFromColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
IntegerFromColorName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
LoadImageProfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
SaveImageProfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
ExtractHalfPanelData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4 • Barcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
ClearBarcode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
DrawBarcode (3 overloaded methods). . . . . . . . . . . . . . . . . . . . . . 50
DrawBarcodeToStream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5 • Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
GetDriverName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
ClearGraphicsLayers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
BuildGraphicsLayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
BuildGraphicsLayersEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
PrintGraphicsLayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
ii ZMotif SDK Software Developer Reference Manual P1004475-003
Contents
LoadJobConfigFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
TestPrint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
PrintGraphicsLayersWithMagData . . . . . . . . . . . . . . . . . . . . . . . . . 64
MagDataOnly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
ReadMagData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
SmartCardDataOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
GetJobList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
GetJobStatus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
GetJobStatusEx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
JobAbort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
JobCancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
JobReprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
JobResume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
JobRetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
SmartCardRetry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
ClearError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
GetPrinters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
GetBroadcastConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
SetBroadcastConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
ReserveDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
GetReservationStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
IsDeviceInSession . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
ReleaseDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
GetSDKVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
GetSDKProductVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
EjectCard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
RejectCard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
ReturnCardToFeeder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
PositionCard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
ReadBarcodeData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6 • Job Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
JobConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
SideConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
MagConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
SmartCardConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
ConfigureDataEncryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
GetDataEncryptionConfiguration. . . . . . . . . . . . . . . . . . . . . . . . . . 107
GetAvailableCardTypes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
GetCardTypeInformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
IntegerFromColorName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
P1004475-003 ZMotif SDK Software Developer Reference Manual iii
Contents
SetKPanelOptimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111
KPanelOverwrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
SetMonoConvType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
7 • Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
GetPrinterStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
ResumeFromStandby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
GetCapabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
GetConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
SetConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
GetCustomCardConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
SetCustomCardConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
GetAvailableMemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
GetDeviceInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
GetFilmParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
GetLog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
GetMagneticEncoderConfiguration . . . . . . . . . . . . . . . . . . . . . . . . 129
GetMagStartSentinelOffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
SetMagStartSentinelOffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
GetNetworkParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
SetNetworkParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
GetPanelPowerLevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
GetPanelPowerLevelsEx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
SetPanelPowerLevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
SetPanelPowerLevelsEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
GetRejectCardCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
ClearRejectBinCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
GetRibbonParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
GetSensorStates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
GetSensorValues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
GetSmartCardConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
GetStatusMessageString. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
GetTotalCardCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
GetTransferTempOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
SetTransferTempOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
GetDisplayedOCPMessage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
BuildOCPMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
ClearOCPMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
DisplayOCPMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
SelectOCPButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
GetCleaningIntervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
SetCleaningIntervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
iv ZMotif SDK Software Developer Reference Manual P1004475-003
Contents
UpgradeFirmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
LockPrinter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
UnlockPrinter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
GetNVMEMData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
SetNVMEMData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
GetWirelessStatus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
GetWirelessRadioStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
GetWirelessParams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
SetWirelessParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
ScanWirelessAccessPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
GetCalibrationTableData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
GetCalibrationTableNames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
GetClock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
GetI2CErrorStats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
LoadCalibrationTableData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
SetClock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
8 • Custom Mag Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
GetMagTrackBitsPerChar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
GetMagTrackDataParity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
GetMagTrackDensity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
GetMagTrackSentinelFormat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
SetMagTrackBitsPerChar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
SetMagTrackDataParity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
SetMagTrackDensity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
SetMagTrackSentinelFormat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
9 • Laminator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
CalibrateLaminate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
RestoreDefaultConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
SaveParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
GetLaminateParams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
GetLaminatorStatus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
GetBottomLaminateOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
SetBottomLaminateOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
GetTopLaminateOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
SetTopLaminateOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
GetLaminationSpeedOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
SetLaminationSpeedOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
GetLaminatorOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
SetLaminatorOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
P1004475-003 ZMotif SDK Software Developer Reference Manual v
Contents
GetLaminatorSensorStates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
GetLaminatorSensorValues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
GetLaminatorCardCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
GetLaminatorInfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
LoadParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
GetOdometerValues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
10 • Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
ByteArrayToVariantArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
BytePtrToVariantArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
IntArrayToVariantArray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
LongArrayToVariantArray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
VariantArrayToByteArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
VariantArrayToIntArray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
VariantArrayToLongArray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Appendix A • Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211
Appendix B • SDK Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Appendix C • XML Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Appendix D • Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Appendix E • Page Size & Orientation Conventions. . . . . . . . . . . . . . . 255
vi ZMotif SDK Software Developer Reference Manual P1004475-003

1.1 About this Manual

This manual contains information for software developers intending to write applications for Zebra ZMotif compatible card printers.
1

Introduction

The ZMotif Application Programming Interface (ZAPI) and Software Development Kit (ZMotif SDK) provides functions to access Zebra ZMotif-based card printers and features.
ZAPI runs on the following Windows Operating Systems:
Windows 7 (32- and 64-bit)
Windows Server 2008 (32- and 64-bit)
Windows 8 and 8.1 (32- and 64-bit)
Windows 10 (32- and 64-bit)

1.2 Required Skills

Experience in developing applications for the Microsoft Windows environment
Experience in developing applications based on XML and XML schemas
Experience in developing applications using dynamic link libraries (dll)
Experience with Microsoft’s Windows Graphics Device Interface (GDI)

1.3 ZMotif Overview Introduction

The ZMotif SDK facilitates the communication of data between a host computer and a Zebra color printer and to provide a solid framework to accommodate future development needs. It is a print job comprehending language that includes job control commands as well as commands to transfer data configure the printer and return information from the printer.
P1004475-003 ZMotif SDK Software Developer Reference Manual 1
Introduction
ZMotif SDK Architecture
The ZMotif SDKis intended for use with “modern-architecture” printers that support multi­tasking with sufficient memory to buffer entire print jobs.
The ZMotif SDK is based on an extensible underlaying printer communication and job control mechanism. This low-level device-specific protocol separates out printer communication data flow, and the actual print job-specific data.

1.4 ZMotif SDK Architecture

ZMotif comprises two distinct independent layers:
1. ZMJ a ZMotif Job description protocol that sits above ZMC.
2. ZMC ZMotif real-time Communications protocol that handles commands to and responses from the target printer.
Most ZMC commands are concerned with housekeeping operations such as configuration control status reporting and error reporting. In fact only one of many ZMC commands Write Data calls on ZMJ to deliver specs and data for the job to be printed. The separation of “job” and “communications” portions of the language is important in three ways:
1. It meshes nicely with the printing architectures of popular operating systems;
2. It simplifies transactions over the communications interface;
3. It facilitates debugging.
2 ZMotif SDK Software Developer Reference Manual P1004475-003

1.5 The ZMJ layer

This layer contains all the commands a printer needs to complete the desired job which might be printing one or more single-sided or double-sided cards or receiving data such as graphics calibration tables fonts and firmware upgrades.
ZMJ is a small set of commands small because ZMJ itself serves mostly as a means of conveying information to the printer in the form of XML documents. For example a print job would begin with the ZMJ command named “Begin Job” consisting mostly of a “Job Control” XML document specifying how the card is to be printed and encoded.
The Job Control XML might be complete in itself containing all the data necessary to execute the job. Alternatively especially if the job includes graphics it will be augmented by one or more appended ZMJ "Send Graphic" commands each referencing a specific tag in the Job Control XML.
Unlike those of ZMC commands in ZMJ are not necessarily executed in real time. Jobs in ZMJ can be stored on disk or buffered internally within the printer and de-spooled at a later time for processing.
Introduction
The ZMJ layer

1.6 The ZMC layer

This layer sits on top of any bi-directional streaming communications channel such as USB or Ethernet. ZMC manages real-time communications tasks such as sending data and receiving error messages. One of ZMC’s tasks is transferring a ZMJ print job from the host to the printer (but note that to ZMC a print job is simply a data stream it doesn’t interact with in any way).
In addition to sending data and receiving error messages ZMC allows the printer to respond to requests for its status including media availability and any controllable parameters thus allowing the host to configure job specifications in the most appropriate way.
P1004475-003 ZMotif SDK Software Developer Reference Manual 3
Introduction
The Windows print job sequence

1.7 The Windows print job sequence

Assuming that the host is running a Zebra-provided Windows printer driver a typical sequence is the following:
A. The Windows application composes
driver.
B. The driver converts the document's description to a ZMJ print job package comprising at
least two commands Begin Job and End Job. The driver also adds to the Job Control XML a ZMJ Job Identifier (a UUID or in a Windows environment a GUID).
Important • Specifications and data for the print job are contained in the Begin Job
command the payload of which is an XML document known as the Job Control XML. The package may also contain within the Begin Job-End Job scope secondary ZMJ commands to convey information not included in the XML such as graphics.
C. The driver sends the print job package to the language monitor which buffers all the data
tween ZMJ Start Job and ZMJ End Job commands.
be
D. When notified by the printer that it is ready to receive the job the language monitor issues
a ZMC Start Action command then delivers the job in one or more ZMC Write Data commands followed by a ZMC End Action command. This signifies that the job transfer has been completed at which time the printer should begin processing.
NOTE: On receiving a Start Action command from the language monitor the printer returns an
on ID number. This can be used together with the ZMJ Job Identifier and the Spooler Job
Acti ID number to uniquely identify the print job.
the document then sends it to the Windows printer

1.8 Multiple hosts in a network

Important • In an Ethernet network where the printer may be shared by multiple hosts,
ZMotif SDK commands allow the printer to receive data from only one host at a time.  
Additionally ZMotif SDK commands require that the printer must have received ALL of a
rint job from a given host before beginning to receive any part of the next print job either
p from that host or any other host.
4 ZMotif SDK Software Developer Reference Manual P1004475-003
Software Development Kit
Graphic COM Object Developer
ZMotif Printer COM Object
Job Class
Job Control
Device
Utilities
Graphics
ZMotif Jobs

2.1 Introduction

The ZMotif Software Development Kit (SDK) provides developers a platform for designing applications for ZMotif compatible devices. It contains two registered COM objects: Graphics and ZMotif Printer.
2
(SDK)
The Graphics Object assists in the basic methods necessary for creating ID Cards. The ZMotif Printer Object contains all of the methods necessary for creating ZMotif jobs and commands.
The ZMotif SDK does not require a printer driver to communicate with a ZMotif-supported
evice and it supports both USB and Ethernet connections.
d
creation of ID Card bitmap images. It contains all of the

2.2 SDK Diagram

P1004475-003 ZMotif SDK Software Developer Reference Manual 5

3.1 Properties

Integer TextContrast gets/sets the contrast value for text
3

Graphics COM Object

Interface Barcode returns the Barcode interface
Enumeration ImageRotation gets/sets image rotation used with DrawImage routines MonochromeConversion gets/sets the type of monochrome conversion to use PrinterModel gets/sets the printer model in use TextRendering gets/sets the text rendering methodology to use
String ColorProfile gets/sets the color profile
P1004475-003 ZMotif SDK Software Developer Reference Manual 7
Graphics COM Object
Methods

3.2 Methods

3.2.1 GetSDKProductVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.2 GetSDKVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.3 InitGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.4 CloseGraphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.5 ClearGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.6 DrawImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.7 DrawEllipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2.8 DrawFillEllipse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.9 DrawLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.10 DrawRectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.11 DrawFillRectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.12 DrawFillRoundedRectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2.13 DrawRoundedRectangle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.14 DrawTextRect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2.15 DrawTextString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.16 CreateBitmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.17 ExtractBlackData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2.18 SetBlackExtractionLevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2.19 ApplyColorProfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2.20 AdjustBrightness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2.21 AdjustColorScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2.22 AdjustContrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.2.23 AdjustSaturation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2.24 AdjustGamma. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.25 ConvertToGrayScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2.26 RotateHue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2.27 CropImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.2.28 SharpenImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2.29 ImageFileToByteArray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.2.30 ImageFromByteArray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.2.31 IPictureFromByteArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.2.32 IntegerFromColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.2.33 IntegerFromColorName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.2.34 LoadImageProfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.2.35 SaveImageProfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.2.36 ExtractHalfPanelData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
8 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.1 GetSDKProductVersion

Description: Retrieves the product version of the SDK.
Syntax: void GetSDKProductVersion( out string ProductVersion )
Parameters: ProductVersion [out]product version of SDK
Returns: nothing
Graphics COM Object
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 9
Graphics COM Object
Methods

3.2.2 GetSDKVersion

Description: Retrieves the version of the SDK.
Syntax: void GetSDKVersion(
Parameters: major [out]major version number of SDK
minor [out]minor version number of SDK build [out]build version number of SDK revision [out]revision version number of SDK
Returns: nothing
out byte major out byte minor out byte build out byte revision )
10 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.3 InitGraphics

Graphics COM Object
Methods
Description: Creates a Windows device context and initializes a graphic buffer for
Syntax 1: void InitGraphics(
Parameters: maxWidth [in ]maximum graphic buffer width
Returns: nothing
Syntax 2: void InitGraphics(
Parameters: maxWidth [in ]maximum graphic buffer width
storing graphic layers.
int maxWidth int maxHeight ImageOrientationEnum imgOrientation RibbonTypeEnum ribType )
maxHeight [in ]maximum graphic buffer height imgOrientation [in ]specifies if card image is portrait
or landscape
ribType [in ]specifies a ribbon type
int maxWidth int maxHeight ImageOrientationEnum imgOrientation RibbonTypeEnum ribType int fillColor )
maxHeight [in ]maximumgraphic buffer height imgOrientation [in ]specifies if the card image is portrait
or landscape ribType [in ]specifies a ribbon type fillColor [in ]identifies if there is a fill color (RGB)
e.g. white = 0xFFFFFF no fill color = -1
Returns: nothing
Note: Setting maxWidth and maxHeight to 00 defaults the image size to match
ID card dimensions 1024 x 648.
P1004475-003 ZMotif SDK Software Developer Reference Manual 11
Graphics COM Object
Methods

3.2.4 CloseGraphics

Description: Releases the device context valuethe graphic buffer memory and
Syntax: void CloseGraphics( void )
Parameters: nothing
Returns: nothing
Note: If the graphics SDK is instantiated CloseGraphics must be called as
the mutex.
part of clean up or the mutex will not be released.
12 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.5 ClearGraphics

Description: Clears the graphic buffer.
Syntax: void ClearGraphics( void )
Parameters: nothing
Returns: nothing
Graphics COM Object
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 13
Graphics COM Object
Methods

3.2.6 DrawImage

Description: Places an image in the graphic buffer.
Syntax 1: void DrawImage(
Parameters: imageData [in ]image byte array
position [in ]image position imgWidth [in ]image width in dots (300 dpi) imgHeight [in ]image height in dots (300 dpi) opacity [in ]image opacity level (0 to 100)
Returns: nothing
Syntax 2: void DrawImage(
Parameters: imageData [in ]image byte array
x [in ]x coordinate top left corner of the image y [in ]y coordinate top left corner of the image imgWidth [in ]image width in dots (300 dpi) imgHeight [in ]image height in dots (300 dpi) opacity [in ]image opacity level (0 to 100)
Returns: nothing
ref byte[] imageData
ImagePositionEnum position
int imgWidth
int imgHeight
float opacity )
ref byte[] imageData
float x
float y
int imgWidth
int imgHeight
float opacity )
Syntax 3: void DrawImage(
Parameters: imageData [in ]image byte array
x [in ]x coordinate top left corner of the image y [in ]y coordinate top left corner of the image imgWidth [in ]image width in dots (300 dpi) imgHeight [in ]image height in dots (300 dpi) opacity [in ]image opacity level (0 to 100) transparencyColorLow [in ]low color value starting transparent color transparencyColorHigh [in ]high color value ending transparent color
Returns: nothing
Note: All colors between transparencyColorLow and tranparencyColorHigh will
be transparent.
Use ImageFileToByteArray(filename) to get imageData from a file.
ref byte[] imageData
float x
float y
int imgWidth
int imgHeight
float opacity
int transparencyColorLow
int transparencyColorHigh )
14 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.7 DrawEllipse

Description: Draws an ellipse in the graphic buffer.
Graphics COM Object
Methods
Syntax: void DrawEllipse(
Parameters: x [in ]x position of top-left corner of rectangle
y [in ]y position of top-left corner of rectangle width [in ]width of the ellipse in dots (300 dpi) heigth [in ]height of the ellipse in dots (300 dpi) thickness [in ]line thickness for the ellipse in dots color [in ]RGB color value
Returns: nothing
float x
float y
float width
float height
float thickness
int color )
P1004475-003 ZMotif SDK Software Developer Reference Manual 15
Graphics COM Object
Methods

3.2.8 DrawFillEllipse

Description: Draws a solid ellipse in the graphic buffer.
Syntax: void DrawFillEllipse(
Parameters: x [in ]x position of top-left corner of rectangle
y [in ]y position of top-left corner of rectangle width [in ]width of the ellipse in dots (300 dpi) heigth [in ]height of the ellipse in dots (300 dpi) fillColor [in ]color of ellipse RGB color value
Returns: nothing
float x
float y
float width
float height
int fillColor )
16 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.9 DrawLine

Description: Draws a line in the graphic buffer.
Graphics COM Object
Methods
Syntax: void DrawLine(
Parameters: x1 [in ]starting x position for the line
y1 [in ]starting y position for the line x2 [in ]ending x position for the line y2 [in ]ending y position for the line color [in ]RGB color value thickness [in ]line thickness
Returns: nothing
float x1
float y1
float x2
float y2
int color
float thickness )
P1004475-003 ZMotif SDK Software Developer Reference Manual 17
Graphics COM Object
Methods

3.2.10 DrawRectangle

Description: Draws a rectangle in the graphic buffer.
Syntax: void DrawRectangle(
Parameters: x [in ]x position of top-left corner of rectangle
y [in ]y position of top-left corner of rectangle width [in ]rectangle width in dots (300 dpi) height [in ]rectangle height in dots (300 dpi) thickness [in ]line thickness color [in ]RGB color value
Returns: nothing
float x
float y
float width
float height
float thickness
int color )
18 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.11 DrawFillRectangle

Description: Draws a solid rectangle in the graphic buffer.
Graphics COM Object
Methods
Syntax: void DrawFillRectangle(
Parameters: x [in ]x position of top-left corner of rectangle
y [in ]y position of top-left corner of rectangle width [in ]rectangle width in dots (300 dpi) height [in ]rectangle height in dots (300 dpi) fillColor [in ]color of rectangle RGB color value
Returns: nothing
float x
float y
float width
float height
int fillColor )
P1004475-003 ZMotif SDK Software Developer Reference Manual 19
Graphics COM Object
Methods

3.2.12 DrawFillRoundedRectangle

Description: Draws a solid rectangle with rounded corners in the graphic buffer.
Syntax: void DrawFillRoundedRectangle(
float x
float y
float width
float height
float radius
int fillColor )
Parameters: x [in ]x position of top-left corner of rectangle
y [in ]y position of top-left corner of rectangle width [in ]rectangle width in dots (300 dpi) height [in ]rectangle height in dots (300 dpi) radius [in ]radius of the semi-circle formed by the
fillColor [in ]color of rectangle RGB color value
Returns: nothing
Sample: float x = 10;
float y = 10; float width = 10; float height = 10; float radius = 20; int fillColor = RGB(100 100 100);
graphics.DrawFillRoundedRectangle(x y width height radius
rounded corners
fillColor );
20 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.13 DrawRoundedRectangle

Description: Draws a rectangle with rounded corners in the graphic buffer.
Graphics COM Object
Methods
Syntax: void DrawRoundedRectangle(
float x float y float width float height float radius float thickness int color )
Parameters: x [in ]x position of top-left corner of rectangle
y [in ]y position of top-left corner of rectangle width [in ]rectangle width in dots (300 dpi) height [in ]rectangle height in dots (300 dpi) thickness [in ]rectangle thickness in dots (300 dpi) color [in ]color of rectangle RGB color value
Returns: nothing
Sample: float x = 10;
float y = 10; float width = 10; float height = 10; float thickness = 20; int color = RGB(100 100 100);
graphics.DrawRoundedRectangle(x y width height thickness color);
P1004475-003 ZMotif SDK Software Developer Reference Manual 21
Graphics COM Object
Methods

3.2.14 DrawTextRect

Description: Draws text in the graphic buffer within the specified rectangle.
Syntax 1: void DrawTextRect(
Parameters: x [in ]x position of top-left corner of rectangle
y [in ]y position of top-left corner of rectangle rectWidth [in ]rectangle width in dots (300 dpi) rectHeight [in ]rectangle height in dots (300 dpi) alignment [in ]alignment within the rectangle text [in ]text data font [in ]font name fontSize [in ]font point size fontStyle [in ]font style color [in ]RGB value
Returns: nothing
Syntax 2: void DrawTextRect(
float x
float y
float rectWidth
float rectHeight
TextAlignmentEnum alignment
string text
string font
float fontSize
FontTypeEnum fontStyle
int color )
float x
float y
float rectWidth
float rectHeight
float angle
TextAlignmentEnum alignment
string text
string font
float fontSize
FontTypeEnum fontStyle
int color )
Parameters: x [in ]x position of top-left corner of rectangle
Returns: nothing
y [in ]y position of top-left corner of rectangle rectWidth [in ]rectangle width in dots (300 dpi) rectHeight [in ]rectangle height in dots (300 dpi) angle [in ]text drawing angle alignment [in ]alignment within the rectangle text [in ]text data font [in ]font name fontSize [in ]font point size fontStyle [in ]font style color [in ]RGB value
22 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.15 DrawTextString

Description: Draws text in the graphic buffer.
Graphics COM Object
Methods
Syntax 1: void DrawTextString(
Parameters: x [in ]x position of top-left corner of text
y [in ]y position of top-left corner of text text [in ]text data font [in ]font name fontSize [in ]font point size fontStyle [in ]font style color [in ]RGB value
Returns: nothing
Syntax 2: void DrawTextString(
Parameters: x [in ]x position of top-left corner of text
y [in ]y position of top-left corner of text angle [in ]text drawing angle alignment [in ]text alignment text [in ]text data font [in ]font name fontSize [in ]font point size fontStyle [in ]font style color [in ]RGB value
float x
float y
string text
string font
float fontSize
FontTypeEnum fontStyle
int color )
float x
float y
float angle
TextAlignmentEnum alignment
string text
string font
float fontSize
FontTypeEnum fontStyle
int color )
Returns: nothing
P1004475-003 ZMotif SDK Software Developer Reference Manual 23
Graphics COM Object
Methods

3.2.16 CreateBitmap

Description: Creates a bitmap image from graphic buffer.
Syntax: byte[] CreateBitmap( out int dataLen )
Parameters: dataLen [out]image size in bytes
Returns: Bitmap image byte array
24 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.17 ExtractBlackData

Description: Performs black data extraction on a given image.
Graphics COM Object
Methods
Syntax: void ExtractBlackData(
Parameters: imageData [in ]given bitmap image’s data
colorImg [out]given image’s color data blackImg [out]given image’s black data
Returns: nothing
Note: If no black data is found in the given image the blackImg parameter
will be null.
ref byte[] imageData
ref byte[] colorImg
ref byte[] blackImg )
P1004475-003 ZMotif SDK Software Developer Reference Manual 25
Graphics COM Object
Methods

3.2.18 SetBlackExtractionLevels

Description: Provides a small amount of manipulation of the threshold which
Syntax: void SetBlackExtractionLevels(
Parameters: redlevel [in ]red color threshold
Returns: nothing
Sample: int redLevel = 25;
determines whether or not a specific pixel contains black data.
int redLevel
int greenLevel
int blueLevel )
greenLevel [in ]green color threshold blueLevel [in ]blue color threshold
int greenLevel = 25; int blueLevel = 25; graphics.SetBlackExtractionLevels(redLevel greenLevel blueLevel);
26 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.19 ApplyColorProfile

Graphics COM Object
Methods
Description: Applies a color profile to an existing bitmap and returns a new bitmap
Syntax: byte[] ApplyColorProfile(
Parameters: profilePath [in ]color profile to apply including path to
Returns: Byte array representing the new image created from the application of
Note: A color profile cannot be applied to a non-color image.
created from the original bitmap and the applied profile.
string profilePath
byte[] origImage )
file's location. origImage [in ]byte array representing original image.
the color profile and original image.
P1004475-003 ZMotif SDK Software Developer Reference Manual 27
Graphics COM Object
Methods

3.2.20 AdjustBrightness

Description: Adjusts image brightness in the graphic buffer.
Syntax: void AdjustBrightness( float brightnessLevel )
Parameters: brightnessLevel [in ]percentage value {-100 to +100}
Returns: nothing
28 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.21 AdjustColorScale

Description: Adjusts the RGB color scales in the graphic buffer.
Graphics COM Object
Methods
Syntax: void AdjustColorScale(
Parameters: redLevel [in ]red contrast level
greenLevel [in ]green contrast level blueLevel [in ]blue contrast level
Returns: nothing
Note: Values are from -100 to +100.
float redLevel
float greenLevel
float blueLevel )
P1004475-003 ZMotif SDK Software Developer Reference Manual 29
Graphics COM Object
Methods

3.2.22 AdjustContrast

Description: Adjusts image contrast for all colors in the graphic buffer.
Syntax: void AdjustContrast( float contrastLevel )
Parameters: contrastLevel [in ]contrast level
Returns: nothing
Note: Values are from -100 to +100.
30 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.23 AdjustSaturation

Description: Adjusts image saturation in the graphic buffer.
Syntax: void AdjustSaturation( float saturationLevel )
Parameters: saturationLevel [in ]image saturation level
Returns: nothing
Note: Values are from -100 to +100.
Graphics COM Object
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 31
Graphics COM Object
Methods

3.2.24 AdjustGamma

Description: Sets the gamma level for the image.
Syntax: void AdjustGamma( int gammaLevel )
Parameters: gammaLevel [in ]new gamma level to be applied
Return: nothing
Sample: int gammaLevel = 100;
graphics.AdjustGamma(gammaLevel);
32 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.25 ConvertToGrayScale

Graphics COM Object
Methods
Description: Converts the color image in the graphic buffer to monochrome applying
Syntax: void ConvertToGrayScale( float scaleFactor )
Parameters: scaleFactor [in ]scale factor; 0.1 to 1.0
Returns: nothing
Description: Converts the color image in the graphic buffer to monochrome applying
Syntax: void ConvertToGrayScale( float red float green float blue )
Parameters: red [in ]red scale factor; 0.1 to 1.0
Returns: nothing
Description: Creates a monochrome image from a color image.
Syntax: void ConvertToGrayScale( byte[] imageData ref byte[] grData )
Parameters: imageData [in ]color image data to be converted
the same scale factor to each color.
specific red green and blue scale factors.
green [in ]green scale factor; 0.1 to 1.0 blue [in ]blue scale factor; 0.1 to 1.0
grData [out]monochrome image data created from
color image
Returns: nothing
P1004475-003 ZMotif SDK Software Developer Reference Manual 33
Graphics COM Object
Methods

3.2.26 RotateHue

Description: Rotate image color spectrum.
Syntax: void RotateHue( float rotation )
Parameters: rotation [in ]degrees of rotation; 0 to 360
Returns: nothing
34 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.27 CropImage

Description: Creates a cropped image from the supplied image.
Graphics COM Object
Methods
Syntax: void CropImage(
Parameters: imageData [in ]image data to be cropped
x [in ]x-coordinate of upper left corner of
y [in ]y-coordinate of upper left corner of
width [in ]width of cropped image in dots (300 dpi) height [in ]height of cropped image in dots (300 dpi) croppedImg [out]cropped image data
Returns: nothing
ref byte[] imageData
int x
int y
int width
int height
ref byte[] croppedImg)
the cropped image
the cropped image
P1004475-003 ZMotif SDK Software Developer Reference Manual 35
Graphics COM Object
Methods

3.2.28 SharpenImage

Description: Sharpens an image in the byte array.
Syntax: void SharpenImage(
Parameters: imageData [in ]array containing the image to sharpen
level [in ]sharpening level; 0 to 100
Returns: nothing
ref byte[] imageData
int level )
36 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.29 ImageFileToByteArray

Description Creates an image byte array from file.
Syntax: byte[] ImageFileToByteArray( string filename )
Parameters: filename [in ]name of the file that contains the image
Returns: Byte array of image created from image file.
Graphics COM Object
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 37
Graphics COM Object
Methods

3.2.30 ImageFromByteArray

Description: Creates a bitmap from an image byte array.
Syntax: Bitmap ImageFromByteArray( ref byte[] imageData )
Parameters: imageDatabyte [in ]byte array containing the image data
Returns: Bitmap image created from image byte array.
38 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.31 IPictureFromByteArray

Description: Returns IPicture data from an image byte array.
Syntax: object IPictureFromByteArray( ref byte[] imageData )
Parameters: imageDatabyte [in ]byte array containing the image data
Returns: IPicture data from image byte array returned as an object.
Graphics COM Object
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 39
Graphics COM Object
Methods

3.2.32 IntegerFromColor

Description: Gets the integer value for a selected system color.
Syntax: int IntegerFromColor( Color color )
Parameters: color [in ]system color
Returns: Integer value which represents the system color object.
40 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.33 IntegerFromColorName

Description: Gets the integer value for a color.
Syntax: int IntegerFromColorName( string colorName )
Parameters: colorName [in ]color name
Returns: Integer value which represents the system color name.
Graphics COM Object
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 41
Graphics COM Object
Methods

3.2.34 LoadImageProfile

Description: Loads an image profile from a file.
Syntax: void LoadImageProfile( string filename )
Parameters: filename [in ]profile file name and path
Returns: nothing
42 ZMotif SDK Software Developer Reference Manual P1004475-003

3.2.35 SaveImageProfile

Descripton: Saves an image profile to a file.
Syntax: void SaveImageProfile( string filename )
Parameters: filename [in ]profile file name and path
Returns: nothing
Graphics COM Object
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 43
Graphics COM Object
Methods

3.2.36 ExtractHalfPanelData

Description: Performs data extraction on a given image when using a
Syntax: void ExtractHalfPanelData(
Parameters: Model [in ]printer model to receive the extracted
Return: Nothing
half-panel ribbon.
PrinterModelTypeEnum model,
ref byte[] sourceImage,
ref byte[] colorRegion,
ref byte[] nonColorRegion)
data; see Appendix B for enumeration values sourceImage [out]bitmap image to perform extraction colorRegion [out]bitmap containing the color data nonColorRegion [out]bitmap containing the non-color data
44 ZMotif SDK Software Developer Reference Manual P1004475-003

4.1 Properties

Boolean AddChecksum gets/sets a flag which determines if achecksum must be
AntiAlias gets/sets a flag which determines if AntiAlias effect must
AutoSize gets/sets a flag which determines if the barcode image is
DisplayChecksum gets/sets a flag which will display the barcode’s checksum
DisplayCode gets/sets a flag which determines if the value to encode will
DisplayStopStartChars gets/sets a flag which determines if the start & stop
HIBCFormattedHumanReadableText
UseQuietZoneForText gets/sets a flag which determines if the quiet zones are to
4

Barcode

generated and attached to the value to encode
be applied to all the texts in the barcode image
automatically resized to display its entire contents.
if set to true
be displayed in the barcode image
characters must be displayed in the barcode image
gets/sets a flag which determines if the human readable text is formatted as specified by HIBC. (Zeros are displayed as Slashed-Zeros and space characters are displayed as underscores)
be used for drawing text code and human readable text
Integer
BackColor gets/sets the background color
BarColor gets/sets the color of the barcode bars
BorderColor gets/sets the barcode control border color
ForeColor gets/sets the text color when rendering the code and human
TextForeColor gets/sets the text color when rendering the DisplayText
P1004475-003 ZMotif SDK Software Developer Reference Manual 45
readable text
property
Barcode
Properties
Interface AztecCodeProperties returns the AztecCode symbology properties class
BarcodeMarginProperties
BearerBarProperties returns the BearerBarProperties interface
CodabarProperties returns the CodabarProperties interface
Code128Properties returns the Code128Properties interface
Code16KProperties returns the Code16KProperties interface
Code39And93Properties returns the Code39 and 93Properties interface
DataMatrixProperties returns the DataMatrix symbology properties interface
EanUpcProperties returns the EAN/ UPC symbology properties interface
GS1DataBarAndRSSExpandedStackedProperties
Isbt128Properties returns the Isbt128 properties interface
MaxiCodeProperties returns the MaxiCode properties interface
MicroQRProperties returns the MicroQR properties interface
MSIProperties returns the MSI properties interface
Pdf417Properites returns the PDF417 symbology properties interface
PharmacodeProperties returns the Pharmacode symbology properties interface
PlanetProperties returns the Planet symbology properties interface
PostalStateProperties returns the PostalState symbology properties interface
PostnetProperties returns the Postnet symbology properties interface
QRCodeProperties returns the QRCode symbology properties interface
TelepenProperties returns the Telepen properties interface
USPSProperties returns the USPS properties interface
returns the BarcodeMargin interface
returns the GS1 DataBar Expanded Stacked and RSS Expanded Stacked properties interface
Double BarcodeBottomMargin gets/sets the margin below the barcode bars
BarcodeHeight gets/sets the barcode image height (the AutoSize property
BarcodeTopMargin gets/sets the height of the margin above the barcode bars
BarcodeWidth gets/sets the barcode image width (the AutoSize property
BarHeight gets/sets the height of the barcode bars
BarRatio gets/sets the ratio of the difference between the width
BarWidth gets/sets the width of the narrow barcode bars
BarWidthAdjustment Sets/returns the width adjustment for the bars
BorderWidth gets/sets the barcode image border width
QuiteZoneWidth gets/sets the width of the quiet zone
must be set to false)
must be set to false)
of the wide barcode bars and the width of the narrow barcode bars
46 ZMotif SDK Software Developer Reference Manual P1004475-003
Barcode
Properties
String DisplayHumanReadableText
DisplayText gets/sets additional text to display in the barcode image in
ValueToEncode gets/sets the value to be encoded
Enumeration BarcodeType gets/sets Barcode type
CodeAlignment gets/sets the text alignment for the DisplayCode property
Rotation gets/sets the rotation angle to apply to the barcode
TextAlignment gets/sets the text alignment of the barcode image
Object Font gets/sets the font to use for rendering the code and human
TextFont gets/sets the font to use for rendering the DisplayText
gets/sets the value to encode as human readable text
addition to the value to encode
readable text
property
P1004475-003 ZMotif SDK Software Developer Reference Manual 47
Barcode
Methods

4.2 Methods

4.2.1 ClearBarcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.2.2 DrawBarcode (3 overloaded methods) . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2.3 DrawBarcodeToStream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
48 ZMotif SDK Software Developer Reference Manual P1004475-003

4.2.1 ClearBarcode

Description: Resets all properties to their default values.
Syntax: void ClearBarcode()
Parameters: None
Returns: nothing
Barcode
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 49
Barcode
Methods

4.2.2 DrawBarcode (3 overloaded methods)

Description 1:Draws the selected barcode symbology using barcode property
values.
Syntax: void DrawBarcode()
Parameters: None
Returns: nothing
Description 2:Draws the selected barcode symbology into a user defined
rectangle.
Syntax: void DrawBarcode(
float x float y float width float height float scale )
Parameters: x [in ]x position of top-left corner of
rectangle y [in ]y position of top-left corner of rectangle width [in ]rectangle width in dots (300 dpi) height [in ]rectangle height in dots (300 dpi) scale [in ]scale value
Returns: nothing
Description 3:Draws the selected barcode symbology into a user defined
rectangle.
Syntax: void DrawBarcode(
float x float y float width float height RotationTypeEnum rotation string font int fontSize FontTypeEnum fontStyle float scale )
Parameters: x [in ]x position of top-left corner of
rectangle y [in ]y position of top-left corner of rectangle width [in ]rectangle width in dots (300 dpi) height [in ]rectangle height in dots (300 dpi) rotation [in ]rotation to apply to barcode (see
enumerations in Appendix B) font [in ]font type to use to render barcode fontStyle [in ]style of font (see enumerations in
Appendix B) scale [in ]scale value
Returns: nothing
50 ZMotif SDK Software Developer Reference Manual P1004475-003

4.2.3 DrawBarcodeToStream

Description: Draws a barcode to the selected stream.
Syntax: void DrawBarcodeToStream( ref Stream stream )
Parameters: stream [in ] the stream to receive the barcode
Returns: nothing
Sample: System.IO.Stream stream = new System.IO.MemoryStream();
graphics.Barcode.DrawBarcodeToSteam(ref stream);
Barcode
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 51

5.1 Properties

Boolean
EnableOCPReprint gets/sets a flag indicating whether or not the
IsOpen indicates if a connection to a device is active,
ReadResponse sets/gets if a response is to be read after
5
Job
printer’s OCP will display a Reprint button
read only
sending ZMC WriteData
Class
FileSystem returns a FileSystem class object
Enumeration
EventLogLevel gets/sets/EventLogTypeEnum - a value indicating the
detail level of information to be logged
Float
EthernetOpenTimeout sets/gets the time out value for opening an
Ethernet connection
Interface
CustomMagSettings returns the CustomMagSettings Interface Device returns the Device Interface JobControl returns the JobControl Interface Laminator returns the Laminator Interface Utilities returns the Utilities Interface
Short
HostTCPPort sets/gets host’s TCP/IP port address HttpPort gets/sets the host’s HTTP port value
P1004475-003 ZMotif SDK Software Developer Reference Manual 53
Job
Methods

5.2 Methods

5.2.1 GetDriverName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.2.2 Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.2.3 Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.2.4 ClearGraphicsLayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.2.5 BuildGraphicsLayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.2.6 BuildGraphicsLayersEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.2.7 PrintGraphicsLayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.2.8 LoadJobConfigFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.2.9 TestPrint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.2.10 PrintGraphicsLayersWithMagData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.2.11 MagDataOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.2.12 ReadMagData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2.13 SmartCardDataOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.2.14 GetJobList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.2.15 GetJobStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.2.16 GetJobStatusEx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.2.17 JobAbort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.2.18 JobCancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.2.19 JobReprint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.2.20 JobResume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.2.21 JobRetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.2.22 SmartCardRetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.2.23 ClearError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.2.24 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.2.25 GetPrinters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.2.26 GetBroadcastConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.2.27 SetBroadcastConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.2.28 ReserveDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.2.29 GetReservationStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.2.30 IsDeviceInSession. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.2.31 ReleaseDevice. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.2.32 GetSDKVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.2.33 GetSDKProductVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.2.34 EjectCard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.2.35 RejectCard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.2.36 ReturnCardToFeeder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.2.37 PositionCard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.2.38 ReadBarcodeData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
54 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.1 GetDriverName

Description: Retrieves the printer name from the printer driver.
Syntax: string GetDriverName( string deviceName )
Parameters: deviceName [in ]serial number of ZXP Printer
Returns: printer name being used by printer driver
Sample: string DriverName = job.GetDriverName(deviceName);
Job
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 55
Job
Methods

5.2.2 Open

Description: Establishes a connection to a ZMotif device.
Syntax: short Open( string deviceName )
Parameters: deviceName [in ]name of the ZMotif device
Returns: error code (see Appendix A)
Sample: //USB Connection:
Job job = new Job(); try {
string deviceName = "06C102100019"; //printer serial number
short alarm = job.Open(deviceName); } catch (Exception ex) {
string errMsg = ex.Message; }
//Ethernet Connection: Job job = new Job(); try {
string deviceName = "10.1.5.123"; //printer IP address
short alarm = job.Open(deviceName); } catch (Exception ex) {
string errMsg = ex.Message; }
//Printer driver installed/USB connection:
Job job = new Job(); try {
//printer driver name
string deviceName =
short alarm = job.Open(deviceName); } catch (Exception ex) {
string errMsg = ex.Message; }
//Printer driver installed/Ethernet connection: Job job = new Job(); try {
//printer driver name
string deviceName =
short alarm = job.Open(deviceName); } catch (Exception ex) {
string errMsg = ex.Message; }
"Zebra ZXP Series 8 USB Card Printer";
"Zebra ZXP Series 8 Network Card Printer";
56 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.3 Close

Description: Closes the connection to a ZMotif Device.
Syntax: void Close()
Parameters: nothing
Returns: nothing
Sample:
Job
Methods
try { if (job.IsOpen)
job.Close(); } catch (Exception ex) {
string errMsg = ex.Message; } finally //be sure to release the interface to avoid memory leaks
{
do
{
Thread.Sleep(10);
} while (Marshal.FinalReleaseComObject(job) > 0); }
Note: As an alternative to calling it each time the Close method is
called, the do-while loop can be called prior to the application shutting down to prevent memory leaks.
P1004475-003 ZMotif SDK Software Developer Reference Manual 57
Job
Methods

5.2.4 ClearGraphicsLayers

Description: Erases all graphic layers.
Syntax: void ClearGraphicsLayers()
Parameters: nothing
Returns: nothing
Sample: job.ClearGraphicsLayers();
58 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.5 BuildGraphicsLayers

Description: Builds a graphic image layer.
Syntax: void BuildGraphicsLayers (
Parameters: side [in]specifies the graphic layer's card side
printType [in]type of print to perform(see Appendix B
xOffset [in]x offset yOffset [in]y offset imgOpacity [in]opacity value fillColor [in]layer background fill color (RGB);
graphicType [in]image format (see Appendix B for
graphicData [in]image to import
Job
Methods
SideEnum side, PrintTypeEnum printType, int xOffset, int yOffset, int imgOpacity, int fillColor, GraphicTypeEnum graphicType, object graphicData )
for enumeration values)
-1 indicates no fill color
enumeration values)
Returns: nothing
Note: The first layer build will be the background, and the last layer
will be the foreground.
Sample: See sample for PrintGraphicsLayers or
PrintGraphicsLayersWithMagData
P1004475-003 ZMotif SDK Software Developer Reference Manual 59
Job
Methods

5.2.6 BuildGraphicsLayersEx

Description: Builds a graphic image layer which includes controlling the
ribbon panel movement direction, panel count for movement, and panel offset information. The layer can also be defined to overprint another image.
Syntax: void BuildGraphicsLayersEx (
SideEnum side, PrintTypeEnum printType, int xOffset, int yOffset, int imgOpacity, int fillColor, PanelDiectionEnum panelDirection, PanelCountEnum panelCount, int panelOffset, bool overprint, GraphicTypeEnum graphicType, object graphicData )
Parameters: side [in]specifies the graphic layer's card side
printType [in]type of print to perform(see Appendix B
xOffset [in]x offset yOffset [in]y offset imgOpacity [in]opacity value fillColor [in]layer background fill color (RGB);
panelDirection [in]direction of ribbon panel movement:
panelCount [in]number of panels to move for panel
panelOffset [in]current panel overprint [in]determines if image should be printed over graphicType [in]image format (see Appendix B for
graphicData [in]image to import
Returns: nothing
Note: The first layer build will be the background, and the last layer
will be the foreground.
Sample: job.BuildGraphicsLayersEx(SideEnum.Front,
(see Appendix B for enumeration values)
for enumeration values)
-1 indicates no fill color
advance or reverse (see Appendix B for enumeration values)
direction (see Appendix B for enumeration values)
enumeration values)
PrintTypeEnum.Color, 0, 0, 1, -1, PanelDirectionEnum.AdvancePanel, PanelCountEnum.OnePanel, 10, false, GraphicTypeEnum.BMP, graphicData);
60 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.7 PrintGraphicsLayers

Description: Prints all layers built by BuildGraphicsLayers.
Syntax: void PrintGraphicsLayers(
Parameters: copies [in ] number of copies to print
actionID [out]returned by a ZMotif device identifying
Returns: nothing
Note: If the card’s source and destination locations are not
assigned for the current print job, the default locations FeederSourceEnum.CardFeeder, and DestinationTypeEnum.Eject will be assigned automatically for the card’s source and destination locations respectively if no previous print job has been created. If a previous print job has been created, its source and destination locations will be used for the current print job.
Sample: // Prints front and back side images
Job job = new Job(); try { byte[] bmpFront = ImageToByteArray("Front.bmp");
byte[] bmpBack = ImageToByteArray("Back.bmp");
job.Open(deviceName);
job.BuildGraphicsLayers(SideEnum.Front, PrintTypeEnum.Color,
job.BuildGraphicsLayers(SideEnum.Back, PrintTypeEnum.MonoK,
int copies = 1;
//assign the card's source and destination locations for
//the print job:
job.JobControl.FeederSource = FeederSourceEnum.CardFeeder;
job.JobControl.Destination = DestinationTypeEnum.Eject;
job.PrintGraphicsLayers(copies, out actionID);
job.ClearGraphicsLayers();
while(true)
{ job.GetJobStatus(actionID, out uuidJob,
}
if error status
} catch (Exception ex) { errMsg = ex.Message; } finally { job = null; }
Job
Methods
int copies, out int actionID)
a job’s ID
0, 0, 0, GraphicTypeEnum.BMP, bmpFront);
0, 0, 0, GraphicTypeEnum.BMP, bmpBack);
out printingStatus, out errorCode, out copiesCompleted, out copiesRequested, out magStatus, out contactStatus, out contactlessStatus);
if (printingStatus == "done_ok" ||
printingStatus == "cleaning_up" || printingStatus == "done_error" || printingStatus == “cancelled_by_user” || printingStatus == “cancelled_by_error) break;
jobs can be aborted or retried
P1004475-003 ZMotif SDK Software Developer Reference Manual 61
Job
Methods

5.2.8 LoadJobConfigFile

Description: Notifies the SDK to use the specified xml configuration document
for the job.
Syntax: LoadJobConfigFile( string configFilePath )
Parameters: configFilePath [in ] document containing configuration
Returns: none
information
Note: The complete path to the configuration file must be supplied each
Sample: job.LoadJobConfig(configFilePath);
time the file is to be used.
62 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.9 TestPrint

Description: Sends a test image to a device.
Syntax: void TestPrint(
Parameters: testImagetest [in ] image number
Returns: nothing
Job
Methods
byte testImage, int copies, bool doubleSide, out int actionID )
copies [in ] number of tests doubleSide [in ] identifies if test print is single-sided
or dual-sided
actionID [out]returned by a ZMotif device identifying
a job’s ID
Note: If the card’s source and destination locations are not
Sample: try
assigned for the current print job, the default locations FeederSourceEnum.CardFeeder, and DestinationTypeEnum.Eject will be assigned automatically for the card’s source and destination locations respectively if no previous print job has been created. If a previous print job has been created, its source and destination locations will be used for the current print job.
//assign the card's source and destination locations for //the print job: job.JobControl.FeederSource = FeederSourceEnum.CardFeeder; job.JobControl.Destination = DestinationTypeEnum.Eject; { job.TestPrint(1, 1, true, out actionID);
while(true)
{ alarm = job.GetJobStatus(actionID, out uuidJob,
out printingStatus, out errorCode, out copiesCompleted, out copiesRequested, out magStatus, out contactStatus, out contactlessStatus);
if (printingStatus == "done_ok" ||
printingStatus == "cleaning_up" || printingStatus == "done_error" || printingStatus == “cancelled_by_user” ||
printingStatus == “cancelled_by_error) break; } if error status
jobs can be aborted or retried } catch (Exception ex) { errMsg = ex.Message; }
P1004475-003 ZMotif SDK Software Developer Reference Manual 63
Job
Methods

5.2.10 PrintGraphicsLayersWithMagData

Description: Encodes the magnetic data and prints the graphics layers.
Syntax: void PrintGraphicsLayersWithMagData(
int copies, string track1, string track2, string track3, out int actionID)
Parameters: copies [in ]number of copies to print and encode
track1 [in ]null or “” indicates no data to encode track2 [in ]null or “” indicates no data to encode track3 [in ]null or “” indicates no data to encode actionID [out]returned by a ZMotif device identifying
Returns: nothing
Note: If the card’s source and destination locations are not
assigned for the current print job, the default locations FeederSourceEnum.CardFeeder, and DestinationTypeEnum.Eject will be assigned automatically for the card’s source and destination locations respectively if no previous print job has been created. If a previous print job has been created, its source and destination locations will be used for the current print job.
a job’s ID
Sample: See next page
64 ZMotif SDK Software Developer Reference Manual P1004475-003
Sample: // Prints front and back side images
Job job = new Job(); try { byte[] bmpFront = ImageToByteArray("Front.bmp");
byte[] bmpBack = ImageToByteArray("Back.bmp");
job.Open(deviceName); job.BuildGraphicsLayers(SideEnum.Front, PrintTypeEnum.Color,
0, 0, 0, GraphicTypeEnum.BMP, bmpFront);
job.BuildGraphicsLayers(SideEnum.Back, PrintTypeEnum.MonoK,
0, 0, 0, GraphicTypeEnum.BMP, bmpBack);
job.JobControl.MagConfiguration(SideEnum.Front,
MagCoercivityEnum.HighCo, MagEncodingTypeEnum.ISO,
MagDataFormatEnum.Ascii, true);
int copies = 1; string track1Data = "ABCDEFGH"; string track2Data = "12345678"; string track3Data = "87654321"; //assign the card's source and destination locations for //the print job: job.JobControl.FeederSource = FeederSourceEnum.CardFeeder; job.JobControl.Destination = DestinationTypeEnum.Eject; job.PrintGraphicsLayersWithMagData(copies, track1Data,
track2Data, track3Data, out actionID); while(true) { job.GetJobStatus(actionID, out uuidJob,
out printingStatus, out errorCode, out copiesCompleted,
out copiesRequested, out magStatus, out contactStatus, out contactlessStatus);
if (printingStatus == "done_ok" ||
printingStatus == "cleaning_up" || printingStatus == "done_error" || printingStatus == “cancelled_by_user” || printingStatus == “cancelled_by_error ||
magStatus.Contains(“error”)) break; } if error status
jobs can be aborted or retried } catch (Exception ex) { string errMsg = ex.Message; } finally { job = null; }
Job
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 65
Job
Methods

5.2.11 MagDataOnly

Description: Sends a magnetic encoding job, does not print.
Syntax: void MagDataOnly(
Parameters: copies [in ]number of cards to encode
Returns: nothing
Note: If the card’s source and destination locations are not
int copies, string track1, string track2, string track3, out int actionID)
track1 [in ]null or “” indicates no data to encode track2 [in ]null or “” indicates no data to encode track3 [in ]null or “” indicates no data to encode actionID [out]returned by a ZMotif device identifying
a job’s ID
assigned for the current print job, the default locations FeederSourceEnum.CardFeeder, and DestinationTypeEnum.Eject will be assigned automatically for the card’s source and destination locations respectively if no previous print job has been created. If a previous print job has been created, its source and destination locations will be used for the current print job.
Sample: Job job = new Job();
try { job.Open(deviceName);
//assign the card's source and destination locations for //the print job: job.JobControl.FeederSource = FeederSourceEnum.CardFeeder; job.JobControl.Destination = DestinationTypeEnum.Eject; job.MagDataOnly (1, "TRACK1DATA", "22222222", "33333333",
out actionID);
while (true) { alarm = job.GetJobStatus(actionID, out uuidJob,
out printingStatus, out errorCode, out copiesCompleted, out copiesRequested, out magStatus, out contactStatus, out contactlessStatus);
if (printingStatus == "done_ok" ||
printingStatus == "cleaning_up" || printingStatus == "done_error" || printingStatus == “cancelled_by_user” || printingStatus == “cancelled_by_error ||
magStatus.Contains(“error”) break; } if error status
jobs can be aborted or retried } catch (Exception ex) { errMsg = ex.Message; }
66 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.12 ReadMagData

Description: Reads one or more magnetic track.
Syntax: void ReadMagData(
Parameters: tracksToRead [in ]number of track to read (see Appendix B
Returns: nothing
Job
Methods
DataSourceEnum tracksToRead, out string track1, out string track2, out string track3, out int actionID);
for enumeration values) track1 [out] Track 1 data track2 [out] Track 2 data track3 [out] Track 3 data actionID [out] returned by a ZMotif device identifying
a job’s ID
Note: If the card’s source and destination locations are not
Sample: Job job = new Job();
EIN Example: See next page
assigned for the current print job, the default locations FeederSourceEnum.CardFeeder, and DestinationTypeEnum.Eject will be assigned automatically for the card’s source and destination locations respectively if no previous print job has been created. If a previous print job has been created, its source and destination locations will be used for the current print job.
try { job.Open(deviceName);
//assign the card's source and destination locations for //the print job: job.JobControl.FeederSource = FeederSourceEnum.CardFeeder; job.JobControl.Destination = DestinationTypeEnum.Eject; job.ReadMagData(DataSourceEnum.Track1Data |
DataSourceEnum.Track2Data | DataSourceEnum.Track3Data,
out track1, out track2, out track3, out actionID); } catch (Exception ex) { errMsg = ex.Message; }
P1004475-003 ZMotif SDK Software Developer Reference Manual 67
Job
Methods
EIN Example: Here is the example code demonstrating how to work with EIN:
String Track1Data = ""; String Track3Data = ""; String EIN = ""; int actionID = 0;
//sets the EIN track number: job.JobControl.DataSource = DataSourceEnum.Track2Data;
//read the EIN from track 2: job.ReadMagData(DataSourceEnum.Track2Data, out Track1Data,
out EIN, out Track3Data, out actionID);
//determine if EIN is correct: if (EIN.Length > 0)
{ //insert your logic here for making this determination } else //EIN not encoded on track 2 {
//insert your logic here for processing empty EIN track
}
68 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.13 SmartCardDataOnly

Description: Starts a smart card encode job, does not print.
Syntax: void SmartCardDataOnly(
Parameters: copies [in ] numner of cards to encode
actionID [out] returned by a ZMotif device identifying
Returns: nothing
Note 1: SmartCardDataOnly moves a card to the smart card encoding station
and suspends the job; the job is either completed via the JobResume function or aborted via the JobAbort function.
Job
Methods
int copies, out int actionID)
a job’s ID
Note 2: If the card’s source and destination locations are not
Sample: See next page
assigned for the current print job, the default locations FeederSourceEnum.CardFeeder, and DestinationTypeEnum.Eject will be assigned automatically for the card’s source and destination locations respectively if no previous print job has been created. If a previous print job has been created, its source and destination locations will be used for the current print job.
P1004475-003 ZMotif SDK Software Developer Reference Manual 69
Job
Methods
Sample: Job job = new Job();
try { job.Open(deviceName);
job.JobControl.SmartCardConfiguration(SideEnum.Front,
SmartCardTypeEnum.Contact, true);
//assign the card's source and destination locations for //the print job: job.JobControl.FeederSource = FeederSourceEnum.CardFeeder; job.JobControl.Destination = DestinationTypeEnum.Eject;
job.SmartCardDataOnly(1, out actionID);
while (true) { alarm = job.GetJobStatus(actionID, out uuidJob,
out printingStatus, out errorCode, out copiesCompleted, out copiesRequested, out magStatus, out contactStatus, out contactlessStatus);
if (contactStatus == "at_station")
break; }
// PC/SC smart card code goes here
// pseudocode example if smart card encoding is successful job.JobResume(); else
jobs can be aborted, job.JobAbort(), or retried, job.JobRetry()
while (true)
{ alarm = job.GetJobStatus(actionID, out uuidJob,
}
if error status
} catch (Exception ex) { errMsg = ex.Message; }
out printingStatus, out errorCode, out copiesCompleted, out copiesRequested, out magStatus, out contactStatus, out contactlessStatus);
if (printingStatus == "done_ok" ||
printingStatus == "cleaning_up" || printingStatus == "done_error" || printingStatus == “cancelled_by_user” || printingStatus == “cancelled_by_error) break;
jobs can be aborted or retried
70 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.14 GetJobList

Description: Gets a list of the pending jobs.
Syntax: short GetJobList( out object jobList )
Job
Methods
Parameters: jobList [out]string array contains “actionID,
Example: "ActionID: 13, UUID: 86b8d6bc-66f8-4758-acd9-7a3036901094,
Status: done"
"ActionID: 14, UUID: 593839fc-f889-44d0-8df4-1ee0880695f9,
Status: in_progress"
Returns: error code (see Appendix A)
Sample: try
{ object objJobList = null;
alarm = job.GetJobList(out objJobList);
if (objJobList != null)
{ Array array = (Array)objPrinterList;
string[] jobList = new string[array.GetLength(0)]; for (int i = 0; i < array.GetLength(0); i++)
jobList[i] = (string)array.GetValue(i);
}
} catch (Exception ex) { errMsg = ex.Message; }
uuid, status”
P1004475-003 ZMotif SDK Software Developer Reference Manual 71
Job
Methods

5.2.15 GetJobStatus

Description: Gets job status.
Syntax: short GetJobStatus(
Parameters: actionID [in ]job’s Action ID
• printingStatus:
• cardPosition:
int actionID, out string uuidJob, out bool readyForNextJob, out string printingStatus, out string cardPosition, out int errorCode, out int copiesCompleted, out int copiesRequested, out string magStatus, out string contactStatus, out string contactlessStatus)
uuidJob [out]job’s UUID readyForNextJob [out] indicates whether or not the printer can
accept a new job true = can accept new job
false = cannot accept new job printingStatus [out]present job status cardPosition [out]card’s current position in printer errorCode [out]error code copiesCompleted [out]number of copies complete copiesRequested [out]number of copies requested magStatus [out]magnetic encoding status contactStatus [out]contact encoding status contactlessStatus [out]contactless encoding status
"initializing", "receiving", "receive_ok", "receive_error", "receive_offline", "parsed", "in_progress", "done_ok", "done_error", "cancelled_by_user", "cancelled_by_error", "cleaning_up",
"not_in_printer", "held", "ejecting_eject",
"ejecting_reject", "ejecting_feeder" “laminate_insert”,
• magStatus: “encoding”, “verifying”, “reading”, “read_error”, “read_ein_error”, “write_error”, “retrace_error”
• contactStatus: “at_station”, “encoding”, “smart_encode_error”,
“contact_error”
• contactlessStatus: “at_station”, “encoding”, “smart_encode_error”,
“contactless_error”
Returns: error code (see Appendix A)
Sample: See next page
72 ZMotif SDK Software Developer Reference Manual P1004475-003
Sample 1: while (true)
{ alarm = job.GetJobStatus(actionID, out uuidJob,
out printingStatus, out errorCode, out copiesCompleted, out copiesRequested, out magStatus, out contactStatus, out contactlessStatus);
if ( … check status condition …)
break;
}
Job
Methods
Sample 2: Short alarm = job.
out printingStatus, out cardPosition, out errorCode, out copiesCompleted, out copiesRequested, out magStatus, out contactStatus, out contactlessStatus );
GetJobStatus(actionID, out uuidJob,
P1004475-003 ZMotif SDK Software Developer Reference Manual 73
Job
Methods

5.2.16 GetJobStatusEx

Description: Gets job status.
Syntax: short GetJobStatus(
Parameters: actionID [in ]job's Action ID
uuidJob [out]job's UUID readyForNextJob [out] indicates whether or not the printer can
true = can accept new job false = cannot accept new job
printingStatus [out]present job status cardPosition [out]card's current position in printer errorCode [out]error code copiesCompleted [out]number of copies complete copiesRequested [out]number of copies requested magStatus [out]magnetic encoding status contactStatus [out]contact encoding status contactlessStatus [out]contactless encoding status
• printingStatus: "initializing", "receiving", "receive_ok", "receive_error", "receive_offline", "parsed", "in_progress", "done_ok", "done_error", "cancelled_by_user", "cancelled_by_error", "cleaning_up",
• cardPosition: "not_in_printer", "held", "ejecting_eject", "ejecting_reject", "ejecting_feeder”, “laminate_insert"
• Status: "encoding", "verifying", "reading", "read_error", "read_ein_error", "write_error", "retrace_error"
• contactStatus: "at_station", "encoding", "contact_error" "smart_encode_error",
• contactlessStatus: "at_station", "encoding", "contactless_error" "smart_encode_error",
int actionID, out string uuidJob, out bool readyForNextJob, out string printingStatus, out string cardPosition, out int errorCode, out int copiesCompleted, out int copiesRequested, out string Status, out string contactStatus, out string contactlessStatus)
accept a new job
Returns: error code (see Appendix A)
Sample: See next page
74 ZMotif SDK Software Developer Reference Manual P1004475-003
Sample 1: while (true)
{
alarm = job.GetJobStatus(actionID, out uuidJob,
if ( … check status condition …)
break;
}
Job
Methods
out readyForNextJob, out printingStatus, out errorCode, out copiesCompleted, out copiesRequested, out magStatus, out contactStatus, out contactlessStatus);
P1004475-003 ZMotif SDK Software Developer Reference Manual 75
Job
Methods

5.2.17 JobAbort

Description: Aborts a suspended job.
Syntax: void JobAbort( boolean reject, out short alarm)
Parameters: reject [in ]rejects a card if true
Returns: nothing
Sample: job.JobAbort(true, out alarm);
alarm [out]error code (see Appendix A)
76 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.18 JobCancel

Description: Cancels a pending job.
Syntax: void JobCancel( int actionID )
Parameters: actionID [in ]a job’s identifier
Returns: nothing
Note: actionID = 0 cancels all jobs
Sample: job.JobCancel ( actionID ) ;
Job
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 77
Job
Methods

5.2.19 JobReprint

Description: Reprints the last job.
Syntax: void JobReprint( int copies )
Parameters: copies [in ]number of copies to reprint
Returns: nothing
Sample: job.JobReprint ( copies );
78 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.20 JobResume

Description: Resumes a suspended job.
Syntax: void JobResume()
Parameters: nothing
Returns: nothing
Sample: job.JobResume();
Job
Methods
P1004475-003 ZMotif SDK Software Developer Reference Manual 79
Job
Methods

5.2.21 JobRetry

Description: Retries a suspended job.
Syntax: void JobRetry()
Parameters: nothing
Returns: nothing
Sample: job.JobRetry();
80 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.22 SmartCardRetry

Description: Retries the last smart operation.
Syntax: void SmartCardRetry(
Parameters: scType [in ]Smart Card Type (see Appendix B for
Returns: nothing
Sample: job.SmartCardRetry(scType);
Job
Methods
SmartCardTypeEnum scType )
enumeration values)
P1004475-003 ZMotif SDK Software Developer Reference Manual 81
Job
Methods

5.2.23 ClearError

Description: Clears an error on a ZMotif device.
Syntax: short ClearError()
Parameters: nothing
Returns: error code (see Appendix A)
Sample: alarm = job.ClearError();
82 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.24 Reset

Description: Orders a printer to perform a reset.
Syntax: short Reset(
Parameters: resetType [in ]full or warm (see Appendix B for
Returns: error code (see Appendix A)
Sample: alarm = job.Reset(ResetTypeEnum.Full);
Job
Methods
ResetTypeEnum resetType )
enumeration values)
P1004475-003 ZMotif SDK Software Developer Reference Manual 83
Job
Methods

5.2.25 GetPrinters

Description: Gets a list of available printers connected via USB or Ethernet.
Syntax: void GetPrinters(
Parameters: conType [in ]connection type to search (see Appendix B
Returns: nothing
Note: In case of an Ethernet connected printer, the printer name will
ConnectionTypeEnum conType, out object printerList )
for enumeration values) printerList [out]printer list, string array
be followed by a comma and its corresponding IP Address ( “Zebra Printer Name, 10.1.4.82” )
Sample: job = new Job();
{ Array array = (Array)objPrinterList; string[] prnList = new string[array.GetLength(0)]; for (int i = 0; i < array.GetLength(0); i++)
try { object objPrinterList = null;
job.GetPrinters(ConnectionTypeEnum.USB, out objPrinterList); if (objPrinterList != null)
prnList[i] = (string)array.GetValue(i);
} } catch (Exception ex) { string errMsg = ex.Message; } job = null;
84 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.26 GetBroadcastConfiguration

Description: Gets Ethernet broadcasting configuration.
Syntax: void GetBroadcastConfiguration(
Job
Methods
out int retries, out float timeout, out int maxDevices )
Parameters: retries [out]number of times to broadcast
Returns: nothing
Sample: job.GetBroadcastConfiguration(out retries, out timeout,
timeout [out]timeout in seconds maxDevices [out]max number of devices allowed
out maxDevices);
P1004475-003 ZMotif SDK Software Developer Reference Manual 85
Job
Methods

5.2.27 SetBroadcastConfiguration

Description: Sets Ethernet broadcasting configuration.
Syntax: void SetBroadcastConfiguration(
int retries, float timeout, int maxDevices )
Parameters: retries [in ]number of times to broadcast
Returns: nothing
Sample: job.SetBroadcastConfiguration(retries, timeout, maxDevices);
timeout [in ]timeout in seconds maxDevices [in ]max number of devices allowed
86 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.28 ReserveDevice

Description: Reserves a device, used in shared environments.
Syntax: short ReserveDevice(
Parameters: reservationType [in ]immediate or pending (see Appendix B for
Returns: error code (see Appendix A)
Sample: alarm = job.ReserveDevice(ReservationTypeEnum.ImmediateSession,
Job
Methods
ReservationTypeEnum reservationType, out int reservationToken)
enumeration values)
reservationToken [out]reservation status
out reservationToken);
P1004475-003 ZMotif SDK Software Developer Reference Manual 87
Job
Methods

5.2.29 GetReservationStatus

Description: Resturns the status of a reservation request.
Syntax: void GetReservationStatus(
Parameters: reservationToken [in ]reservation token for request status
sessionGranted [out]flag indicating reservation status:
Returns: error code (see Appendix A)
int reservationToken, out bool sessionGranted )
true = reservation granted for token false = reservation not granted for token
88 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.30 IsDeviceInSession

Description: Indicates if a device is in session.
Syntax: short IsDeviceInSession(
Parameters: reservationToken [in ]reservation status
inSessionif [out]true, device is in session
Returns: error code (see Appendix A)
Sample: alarm = job.IsDeviceInSession(reservationToken, out inSession);
Job
Methods
int reservationToken, out boolean inSession )
P1004475-003 ZMotif SDK Software Developer Reference Manual 89
Job
Methods

5.2.31 ReleaseDevice

Description: Releases a reserved device.
Syntax: short ReleaseDevice( int reservationToken )
Parameters: reservationToken [in ]reservation status
Returns: error code (see Appendix A)
Sample: alarm = job.ReleaseDevice(reservationToken);
90 ZMotif SDK Software Developer Reference Manual P1004475-003

5.2.32 GetSDKVersion

Description: Gets the SDK version.
Syntax: void GetSDKVersion(
Parameters: major [out]major number of SDK version
Returns: nothing
Sample: job.GetSDKVersion( out major, out minor, out build,
Job
Methods
out byte major, out byte minor, out byte build, out byte revision )
minor [out]minor number of SDK version build [out]build number of SDK version revision [out]revision number of SDK version
out revision );
P1004475-003 ZMotif SDK Software Developer Reference Manual 91
Job
Methods

5.2.33 GetSDKProductVersion

Description: Gets the SDK product version, adheres to Zebra versioning
standards.
Syntax: void GetSDKProductVersion( out string productVersion )
Parameters: productVersion [out]product version string
Returns: nothing
Sample: string productVersion = string.Empty;
job.GetSDKProductVersion( out productVersion );
92 ZMotif SDK Software Developer Reference Manual P1004475-003
Loading...