Zebra ZQ110 User Manual

ZQ110
Mobile Printer iOS SDK API Reference Guide
P1069077-001 Rev. A
ZQ110
Mobile Printer iOS SDK API Reference Guide
Table of Contents
1. Manual Information ...................................................................................................................................... 7
1-1 Supported Platform & Development Environment ................................................................................... 7
1-2 Supported Platform & Supported Devices ............................................................................................... 7
1-3 Supported Properties List ........................................................................................................................ 7
1-4 Supported Properties List ........................................................................................................................ 8
2. Constant Definition ...................................................................................................................................... 9
2-1 Character Set ........................................................................................................................................... 9
2-2 International Character Set .................................................................................................................... 10
2-3 Barcode/Image/Text Alignment .............................................................................................................. 10
2-4 Text Size................................................................................................................................................. 10
2-5 Text Attribute ........................................................................................................................................... 11
2-6 Barcode Text Position ............................................................................................................................. 11
2-7 Barcode Symbology ............................................................................................................................... 12
2-8 Image Width ........................................................................................................................................... 13
2-9 Power ..................................................................................................................................................... 13
2-10 State ..................................................................................................................................................... 13
2-11 Connection Control .............................................................................................................................. 14
2-12 Model ID ............................................................................................................................................... 14
2-13 Connection Class ................................................................................................................................. 14
2-14 Result Code ......................................................................................................................................... 15
3. BXBarcode Class Reference .................................................................................................................... 16
3-1 Overview ................................................................................................................................................ 16
3-2 Properties ............................................................................................................................................... 16
3-2-1 barNumber ............................................................................................................................... 16
3-2-2 name ........................................................................................................................................ 16
3-2-3 support ..................................................................................................................................... 16
4. BXPrinter Class Reference ....................................................................................................................... 17
4-1 Overview ................................................................................................................................................ 17
4-2 Properties ............................................................................................................................................... 17
4-2-1 name ........................................................................................................................................ 17
4-2-2 address .................................................................................................................................... 17
4-2-3 port ........................................................................................................................................... 17
4-2-4 modelStr ................................................................................................................................... 18
4-2-5 versionStr ................................................................................................................................. 18
4-2-6 macAddress ............................................................................................................................. 18
4-2-7 connectionClass ...................................................................................................................... 18
4-2-8 bluetoothDeviceName ............................................................................................................. 18
5. BXPrinterController Class Reference ...................................................................................................... 19
5-1 Overview ................................................................................................................................................ 19
5-2 Properties ............................................................................................................................................... 19
5-2-1 version ..................................................................................................................................... 19
5-2-2 delegate ................................................................................................................................... 19
5-2-3 target ........................................................................................................................................ 19
5-2-4 lookupDuration ......................................................................................................................... 20
5-2-5 lookupCount ............................................................................................................................. 20
5-2-6 alignment ................................................................................................................................. 20
5-2-7 attribute .................................................................................................................................... 20
5-2-8 textSize .................................................................................................................................... 21
5-2-9 characterSet............................................................................................................................. 21
5-2-10 internationalCharacterSet ...................................................................................................... 21
5-2-11 textEncoding .......................................................................................................................... 21
5-2-12 state ....................................................................................................................................... 22
5-2-13 power ..................................................................................................................................... 22
5-2-14 AutoConnection ..................................................................................................................... 22
5-2-15 errorCorrection ....................................................................................................................... 22
Rev. 1.00
ZQ110
Mobile Printer iOS SDK API Reference Guide
5-3 Instance Methods ................................................................................................................................... 23
5-3-1 getInstance .............................................................................................................................. 23
5-3-2 open ......................................................................................................................................... 23
5-3-3 close ......................................................................................................................................... 23
5-3-4 lookup ...................................................................................................................................... 24
5-3-5 selectTarget.............................................................................................................................. 24
5-3-6 connect .................................................................................................................................... 25
5-3-7 disconnect ................................................................................................................................ 25
5-3-8 disconnectWithTimeout............................................................................................................ 25
5-3-9 isConnected ............................................................................................................................. 26
5-3-10 enableLSB ............................................................................................................................. 26
5-3-11 printText .................................................................................................................................. 26
5-3-12 printBox .................................................................................................................................. 27
5-3-13 lineFeed ................................................................................................................................. 27
5-3-14 nextPrintPos .......................................................................................................................... 28
5-3-15 printBarcode .......................................................................................................................... 28
5-3-16 printBitmap ............................................................................................................................. 29
5-3-17 checkPrinter ........................................................................................................................... 30
5-3-18 msrReadReady ...................................................................................................................... 30
5-3-19 msrReadCancel ..................................................................................................................... 30
5-3-20 msrReadCancelEx ................................................................................................................. 30
5-3-21 msrReadTrack ....................................................................................................................... 31
5-3-22 msrGetTrack .......................................................................................................................... 31
5-3-23 msrReadFullTrack .................................................................................................................. 32
5-3-24 directIO .................................................................................................................................. 32
5-3-25 nvImageList............................................................................................................................ 33
5-3-26 downloadNVImage (Diffusion) ............................................................................................... 34
5-3-27 downloadNVImage (Normal) ................................................................................................. 35
5-3-28 printNVImage ......................................................................................................................... 35
5-3-29 removeNVImage .................................................................................................................... 36
5-3-30 removeAllNVImages .............................................................................................................. 36
5-3-31 isSupport_MSR ...................................................................................................................... 36
5-3-32 isSupport_LSB ....................................................................................................................... 37
5-3-33 isSupport_Barcode ................................................................................................................ 37
5-3-34 getBarcodeSupportTable ....................................................................................................... 37
6. BXPrinterControllerDelegate Protocol Reference .................................................................................. 38
6-1 Overview ................................................................................................................................................ 38
6-2 Instance Methods ................................................................................................................................... 38
6-2-1 didStart ..................................................................................................................................... 38
6-2-2 didStop ..................................................................................................................................... 38
6-2-3 didFindPrinter .......................................................................................................................... 39
6-2-4 didConnect ............................................................................................................................... 39
6-2-5 didNotConnect ......................................................................................................................... 39
6-2-6 willLookupPrinters .................................................................................................................... 40
6-2-7 didLookupPrinters .................................................................................................................... 40
6-2-8 didNotLookup ........................................................................................................................... 40
6-2-9 didBeBrokenConnection .......................................................................................................... 41
6-2-10 msrArrived.............................................................................................................................. 41
6-2-11 msrTerminated ....................................................................................................................... 42
6-2-12 didUpdateStatus .................................................................................................................... 42
Rev. 1.00
ZQ110
Mobile Printer iOS SDK API Reference Guide
Proprietary Statements
This manual contains proprietary information for Zebra Technologies Corporation. It is intended solely for the information and use of parties operating and maintaining the equip­ment described herein. Such proprietary information may not be used, reproduced, or dis­closed to any other parties for any other purpose without the expressed written permission of Zebra Technologies Corporation.
Product Improvements Since continuous product improvement is a policy of Zebra Technologies Corporation, all specifications and signs are subject to change without notice.
FCC Compliance Statement NOTE: This equipment has been tested and found to comply with the limits of a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equip­ment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference with radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
• Reorient or relocate the receiving antenna.
• Increase the separation between the equipment and the receiver.
• Connect the equipment to an outlet or circuit different from that to which the receiver is
connected.
• Consult the dealer or an experienced radio/TV technician for help.
WARNING: Exposure to Radio Frequency radiation. To conform to FCC RF exposure re­quirements this device shall be used in accordance with the operating conditions and in­structions listed in this manual. NOTE: This unit was tested with shielded cables on the peripheral devices. Shielded cables must be used with the unit to ensure compliance. Changes or modifications to this unit not expressly approved by Zebra Technologies Corporation could void the user‟s authority to operate this equipment.
Rev. 1.00
ZQ110
Mobile Printer iOS SDK API Reference Guide
Canadian Compliance Statement
This Class B digital apparatus complies with Canadian ICES-003. Cet appareil numérique de la classe B est conforme á la norme NMB-003 du Canada. “IC:” before the equipment certification number signifies that the Industry Canada technical specifications were met. It does not guarantee that the certified product will operate to the user‟s satisfaction.
Liability Disclaimer Inasmuch as every effort has been made to supply accurate information in this manual, Zebra Technologies Corporation is not liable for any erroneous information or omissions. Zebra Technologies Corporation reserves the right to correct any such errors and disclaims liability resulting therefrom.
No Liability for Consequential Damage In no event shall Zebra Technologies Corporation or anyone else involved in the creation, production, or delivery of the accompanying product (including hardware and software) be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or the results of use of or inability to use such product, even if Zebra Technologies Corporation has been advised of the possibility of such damages. Because some states do not allow the exclusion of liability for consequential or incidental damages, the above limitation may not apply to you.
Rev. 1.00
ZQ110
Mobile Printer iOS SDK API Reference Guide
Copyrights
The copyrights in this manual and the label print engine described therein are owned by Zebra Technologies Corporation. Unauthorized reproduction of this manual or the software in the label print engine may result in imprisonment of up to one year and fines of up to $10,000 (17 U.S.C.506). Copyright violators may be subject to civil liability. This product may contain ZPL® , ZPL II® , and ZebraLink programs; Element Energy Equalizer® Circuit; E3® ; and AGFA fonts. Software © ZIH Corp. All rights reserved worldwide. ZebraLink and all product names and numbers are trademarks, and Zebra, the Zebra logo, ZPL, ZPL II, Element Energy Equalizer Circuit, and E3 Circuit are registered trademarks of ZIH Corp. All rights reserved worldwide. Monotype® , Intellifont® and UFST® are trademarks of Monotype Imaging, Inc. registered in the United States Patent and Trademark Office and may be registered in certain jurisdictions. Andy, CG Palacio, CG Century Schoolbook, CG Triumvirate, CG Times, Monotype Kai, Monotype Mincho and Monotype Sung are trademarks of Monotype Imaging, Inc. and may be registered in some jurisdictions. HY Gothic Hangul is a trademark of Hanyang Systems, Inc. Angsana is a trademark of Unity Progress Company (UPC) Limited. Andale® , Arial® , Book Antiqua® , Corsiva® , Gill Sans® , Sorts® and Times New Roman® are trademarks of The Monotype Corporation registered in the United States Patent and Trademark Office and may be registered in certain jurisdictions. Century Gothic™, Bookman Old Style™ and Century Schoolbook are trademarks of The Monotype Corporation and may be registered in certain jurisdictions. HGPGothicB is a trademark of the Ricoh company, Ltd. and may be registered in some jurisdictions. Univers is a trademark of Heidelberger Druckmaschinen AG, which may be registered in certain jurisdictions, exclusively licensed through Linotype Library GmbH, a wholly owned subsidiary of Heidelberger Druckmaschinen AG. Futura® is a trademark of Bauer Types SA registered in the United States Patent and Trademark Office and may be registered in some jurisdictions. TrueType® is a trademark of Apple Computer, Inc. registered in the United States Patent and Trademark Office and may be registered in certain jurisdictions. All other product names are the property of their respective owners. All other brand names, product names, or trademarks belong to their respective holders. © 2014 ZIH Corp.
Rev. 1.00
ZQ110
Mobile Printer iOS SDK API Reference Guide
Method/Property
Mobile Printer (ZQ110)
Version
Supported
delegate
Supported
Target
Supported
lookupDuration
Supported
lookupCount
Supported
alignment
Supported
attribute
Supported
textSize
Not supported
characterSet
Supported
internationalCharacterSet
Supported
State
Supported
Power
Supported
AutoConnection
Supported
1. Manual Information
This iOS SDK API Reference Guide contains the descriptions of the Library required for the applications program development.
1-1 Supported Platform & Development Environment
- Platform
• iOS 5.1.1 or higher
1-2 Supported Platform & Supported Devices
Compatibility of the following devices was verified:
• iPhone 4G / 5G / 5GS
• iPad2 / iPad mini
1-3 Supported Properties List
Rev. 1.00
Mobile Printer iOS SDK API Reference Guide
1-4 Supported Properties List
Method/Property
Mobile Printer (ZQ110)
getInstance
Supported
open
Supported
close
Supported
lookup
Supported
selectTarget
Supported
connect
Supported
disconnect
Supported
disconnectWithTimeout
Supported
isConnected
Supported
enableLSB
Not supported
printText
Supported
printBox
Supported
lineFeed
Supported
nextPrintPos
Supported
printBarcode
Supported
printBitmap
Supported
checkPrinter
Supported
msrReadReady
Supported
msrReadCancel
Supported
msrReadCancelEx
Supported
msrReadTrack
Supported
msrGetTrack
Supported
msrReadFullTrack
Supported
directIO
Supported
nvImageList
Supported
downloadNVImage (Diffusion)
Supported
downloadNVImage (Normal)
Supported
printNVImage
Supported
removeNVImage
Supported
removeAllNVImages
Supported
isSupport_MSR
Supported
isSupport_LSB
Supported
isSupport_Barcode
Supported
getBarcodeSupportTable
Supported
ZQ110
Rev. 1.00
ZQ110
Mobile Printer iOS SDK API Reference Guide
Code
Value
Description
BXL_CS_PC437
0
Code page PC437
BXL_CS_Katakana
1
Katakana
BXL_CS_PC850
2
Code page PC850(Multilingual)
BXL_CS_PC860
3
Code page PC860(Portuguese)
BXL_CS_PC863
4
Code page PC863(Canadial-French)
BXL_CS_PC865
5
Code page PC865(Nordic)
BXL_CS_PC1252
16
Code page PC1252 (Latin 1)
BXL_CS_PC866
17
Code page PC866(Cyrillic #2)
BXL_CS_PC852
18
Code page PC852 (Latin 2)
BXL_CS_PC858
19
Code page PC858 (Euro)
BXL_CS_PC864
22
Code page PC864 (Hebrew DOS code)
BXL_CS_PC862
21
Code page PC862(Hebrew Old code)
BXL_CS_THAI42
23
Code page THAI42
BXL_CS_WPC1253
24
Code page WPC1253 (Breek)
BXL_CS_WPC1254
25
Code page WPC1254 (Turkish)
BXL_CS_WPC1257
26
Code page WPC1257 (Baltic)
BXL_CS_FARSI
27
Code page FARSI
BXL_CS_WPC1251
28
Code page WPC1251(Cyrillic)
BXL_CS_PC737
29
Code page PC737(Greek)
BXL_CS_PC775
30
Code page PC775(Baltic)
BXL_CS_THAI14
31
Code page THAI14
BXL_CS_HEBREW
32
Code page Hebrew Old code
BXL_CS_WPC1255
33
Code page PC1255(Hebrew New code)
BXL_CS_THAI11
34
Code page PC855(Thai11)
BXL_CS_THAI18
35
Code page PC857(Thai18)
BXL_CS_PC855
36
Code page PC855 (Cyrillic)
BXL_CS_PC857
37
Code page PC857 (Turkish)
BXL_CS_PC928
38
Code page PC928 (Greek)
BXL_CS_THAI16
39
Code page THAI16
BXL_CS_WPC1256
40
Code page WPC1256 (Arabic)
BXL_CS_PC857
37
Code page WPC1258(Vietnam)
BXL_CS_PC928
38
Code page Khmer(Cambodia)
BXL_CS_THAI16
47
Code page WPC1250(Czech)
BXL_CS_WPC1252
48
Code page WPC1252(Latin 9)
BXL_CS_USER
255
User set page
2. Constant Definition
Constants used in the SDK are defined in the “BXCode.h” file.
2-1 Character Set
The following table defines the available code page values. The default value is set to BXL_CS_437.
Rev. 1.00
ZQ110
- 10 -
Mobile Printer iOS SDK API Reference Guide
Code
Value
Description
BXL_ICS_USA
0
U.S.A.
BXL_ICS_FRANCE
1
France
BXL_ICS_GERMANY
2
Germany
BXL_ICS_UK
3
U.K.
BXL_ICS_DENMARK1
4
Denmark I
BXL_ICS_SWEDEN
5
Sweden
BXL_ICS_ITALY
6
Italy
BXL_ICS_SPAIN
7
Spain
BXL_ICS_NORWAY
9
Norway
BXL_ICS_DENMARK2
10
Denmark II
BXL_ICS_SPAIN2
11
SPAIN2
BXL_ICS_LATIN_AMERICA
12
Latin America
BXL_ICS_KOREA
13
Korea
Code
Value
Description
BXL_ALIGNMENT_LEFT
0
Left align
BXL_ALIGNMENT_CENTER
1
Center align
BXL_ALIGNMENT_RIGHT
2
Right align
Code
Value
Description
BXL_TS_0WIDTH
0
Set the ratio of horizontal width to X1
BXL_TS_1WIDTH
16
Set the ratio of horizontal width to X2
BXL_TS_2WIDTH
32
Set the ratio of horizontal width to X3
BXL_TS_3WIDTH
48
Set the ratio of horizontal width to X4
BXL_TS_4WIDTH
64
Set the ratio of horizontal width to X5
BXL_TS_5WIDTH
80
Set the ratio of horizontal width to X6
BXL_TS_6WIDTH
96
Set the ratio of horizontal width to X7
BXL_TS_7WIDTH
112
Set the ratio of horizontal width to X8
2-2 International Character Set
The following table defines the available international character set. The default value is set to BXL_ICS_USA.
2-3 Barcode/Image/Text Alignment
The following table defines the available bar code/image/text alignment. The default value is set to BXL_ALIGNMENT_LEFT.
2-4 Text Size
The following table defines the available settings for the text size, and horizontal and vertical ratio can be defined simultaneously with the OR operation.
Rev. 1.00
ZQ110
- 11 -
Mobile Printer iOS SDK API Reference Guide
Code
Value
Description
BXL_TS_0HEIGHT
0
Set the ratio of vertical height to X1
BXL_TS_1HEIGHT
16
Set the ratio of vertical height to X2
BXL_TS_2HEIGHT
32
Set the ratio of vertical height to X3
BXL_TS_3HEIGHT
48
Set the ratio of vertical height to X4
BXL_TS_4HEIGHT
64
Set the ratio of vertical height to X5
BXL_TS_5HEIGHT
80
Set the ratio of vertical height to X6
BXL_TS_6HEIGHT
96
Set the ratio of vertical height to X7
BXL_TS_7HEIGHT
112
Set the ratio of vertical height to X8
Code
Value
Description
BXL_FT_DEFAULT
0
Default setting NOT BOLD, FONTA, NOT UNDERLINE, NOT REVERSE
BXL_FT_FONTB
1
Use FONTB
BXL_FT_FONTC
16
Use FONTC
BXL_FT_BOLD
2
Use Bold font
BXL_FT_UNDERLINE
4
Set Underline property
BXL_FT_REVERSE
8
Set Reverse property
Code
Value
Description
BXL_BC_TEXT_NONE
0
Do not print barcode data
BXL_BC_TEXT_ABOVE
1
Print bar code data above barcode
BXL_BC_TEXT_BELOW
2
Print bar code data below barcode
2-5 Text Attribute
The following table defines available text properties. Each property can be combined with the OR operation.
2-6 Barcode Text Position
The following table defines the available barcode text positions (the position where barcode data is printed in relation to the barcode).
Rev. 1.00
- 12 -
Mobile Printer iOS SDK API Reference Guide
2-7 Barcode Symbology
Code
Value
Number of data
Range of data
BXL_BCS_UPCA
101
11 <= n <= 12
48 <= data <= 57
BXL_BCS_UPCE
102
11 <= n <= 12
48 <= data <= 57
BXL_BCS_EAN13
103
12 <= n <= 13
48 <= data <= 47
BXL_BCS_JAN13
104
7 <= n <= 8
48 <= data <= 57 64 <= data <= 90 data = 32,36,37,43,45,46,47
BXL_BCS_EAN8
105
7 <= n <= 8
48 <= data <= 57
BXL_BCS_JAN8
106
7 <= n <= 8
48 <= data <= 57
BXL_BCS_Code39
107
1 <= n <= 255
48 <= data <= 57 65 <= data <= 68 data = 32,36,37,43,45,46,47
BXL_BCS_ITF
108
1 <= n <= 255 (Even)
48 <= data <= 57
BXL_BCS_Codabar
109
1 <= n <= 255
48 <= data <= 57 65 <= data <= 68 data = 36,43,45,46,47,58
BXL_BCS_Code93
110
1 <= n <= 255
0 <= data <= 127
BXL_BCS_Code128
111
2 <= n <= 255
0 <= data <= 127
BXL_BCS_PDF417
200
2 <= n <= 928
0 <= data <= 255
BXL_BCS_QRCODE_MODEL1
202
2 <= n <= 928
0 <= data <= 255
BXL_BCS_QRCODE_MODEL2
203
2 <= n <= 928
0 <= data <= 255
BXL_BCS_DATAMATRIX
204
2 <= n <= 928
0 <= data <= 255
BXL_BCS_GS1_RSS14
208
0 ≤ GTINn ≤ 13 0 ≤ AIn ≤ 164
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_RSS14TRUNCAT ED
209
0 ≤ GTINn ≤ 13 0 ≤ AIn ≤ 164
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_RSS14STACKED
210
0 ≤ GTINn ≤ 13 0 ≤ AIn ≤ 45
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_RSS14STACKED OMNIDIRECTIONAL
211
0 ≤ GTINn ≤ 13 0 ≤ AIn ≤ 45
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_UPCA
214
0 ≤ GTINn ≤ 12 0 ≤ AIn ≤ 164
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_UPCE
215
0 ≤ GTINn ≤ 13 0 ≤ AIn ≤ 46
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_EAN13
216
0 ≤ GTINn ≤ 12 0 ≤ AIn ≤ 164
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_EAN8
217
0 ≤ GTINn ≤ 12 0 ≤ AIn ≤ 106
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_EAN128CC_AB
218
0 ≤ GTINn ≤ 48 0 ≤ AIn ≤ 164
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_GS1_ EAN128CC_C
219
0 ≤ GTINn ≤ 48 0 ≤ AIn ≤ 164
48 ≤ GTIN ≤ 57 0 ≤ AI ≤ 255
BXL_BCS_AZTEC_DATA
220
0 ≤ AIn ≤ 300
0 <= data <= 255
BXL_BCS_AZTEC_GS1
221
0 ≤ AIn ≤ 300
0 <= data <= 255
BXL_BCS_AZTEC_LATIN1
222
0 ≤ AIn ≤ 300
0 <= data <= 255
The following table defines the available bar code types.
ZQ110
Rev. 1.00
ZQ110
- 13 -
Mobile Printer iOS SDK API Reference Guide
Code
Value
Description
BXL_WIDTH_FULL
-1
Value is set to max width and the image is resized to the full paper size
BXL_WIDTH_NONE
-2
Image is not resized
Code
Value
Description
BXL_PWR_HIGH
0
Remaining battery capacity is 95%
BXL_PWR_MIDDLE
1
Remaining battery capacity is 85%
BXL_PWR_LOW
2
Remaining battery capacity is 50%
BXL_PWR_SMALL
3
Remaining battery capacity is 25%
BXL_PWR_NOT
4
Remaining battery capacity is less than 25%
Code
Value
Description
BXL_STS_NORMAL
0
Normal
BXL_STS_PAPEREMPTY
1
No paper
BXL_STS_COVEROPEN
2
Printer cover open
BXL_STS_POWEROVER
4
Not enough remaining battery of printer
BXL_STS_MSR_READY
8
No printing MSR read only mode
BXL_STS_PRINTING
16
Printer is printing or receiving data
BXL_STS_ERROR
32
Error in communication with printer
BXL_STS_NOT_OPEN
64
Open method of BXPrinterControl was not called
BXL_STS_ERROR_OCCUR
128
Printer internal error
BXL_STS_NOT_CONNECTED
-1
Currently printer is not connected
2-8 Image Width
The following table defines the available settings for resizing the width of an image.The valid range is 0 to maximum width.
2-9 Power
The read-only Power setting indicates the remaining battery capacity of the printer. A change of battery status is shown automatically.
Supported Device: Mobile Printer (ZQ110)
The remaining battery capacity status values are as follows.
2-10 State
The read-only Status setting indicates the status of the printer. The status of the printer is shown automatically when printer status is checked by calling the CheckPrinter function. Status values can be combined, and each setting can be checked through bit operation.
Printer status settings are as follows.
Rev. 1.00
ZQ110
- 14 -
Mobile Printer iOS SDK API Reference Guide
Code
Value
Description
BXL_CONNECTIONMODE_AUTO
0
Automatic connect mode
BXL_CONNECTIONMODE_NOAUTO
100
Not automatic connect mode
Code
Value
Description
BXL_MODEL_ID_ZQ110
0x12001003
ZQ110
Code
Value
Description
BXL_CONNECTIONCLASS_WIFI
0x0000
WIFI Connection
BXL_CONNECTIONCLASS_ETHERNET
0x0001
Ethernet Connection
BXL_CONNECTIONCLASS_BT
0x0002
Bluetooth Connection
2-11 Connection Control
The following table defines the type of printer connection.
2-12 Model ID
The model ID defines the type of printer. Available settings are as follows.
2-13 Connection Class
When the method 'didFindPrinter' is called, this value is updated to connectionClass in BXPrinter class.
Refer to 6-2-3 didFindPrinter for more information.
Rev. 1.00
- 15 -
Mobile Printer iOS SDK API Reference Guide
2-14 Result Code
Code DEFINE
Value
Description
BXL_SUCCESS
0
Success
BXL_NOT_CONNECTED
-1
Printer is not connected
BXL_NOT_OPENED
101
SDK is not open
BXL_STATUS_ERROR
103
Error in status check
BXL_CONNECT_ERROR
105
Connection failure
BXL_NOT_SUPPORT
107
Not supported
BXL_BAD_ARGUMENT
108
Wrong function arguments
BXL_BUFFER_ERROR
109
Error in MSR buffer
BXL_NOT_CONNECTED
110
Printer is not connected
BXL_RGBA_ERROR
111
Error while converting image file to RGBA data
BXL_MEMORY_ERROR
112
Memory allocation failure
BXL_TOO_LARGE_IMAGE
113
Size of image file is too big while downloading image to NV area
BXL_NOT_SUPPORT_DEVICE
114
The printer device does not support
BXL_READ_ERROR
301
Failure in data reception
BXL_WRITE_ERROR
300
Failure in data transmission
BXL_BITMAPLOAD_ERROR
400
Fail to read image file
BXL_BC_DATA_ERROR
500
Error in bar code data
BXL_BC_NOT_SUPPORT
501
Unsupported bar code type
BXLMSR_NOTREADY
602
Not MSR READY state
BXLMSR_FAILEDMODE
601
Not automatic read mode
BXLMSR_DATAEMPTY
603
No data read from MSR
The following table defines the possible result codes.
ZQ110
Rev. 1.00
ZQ110
- 16 -
Mobile Printer iOS SDK API Reference Guide
Inherits from
NSObject
Confirms to
Framework
BXPrinter.a
[Availability]
iOS Printer SDK 1.0.0 and later
Declared
BXBarcodeInfo.h
3. BXBarcode Class Reference
3-1 Overview
BXBarcode class is an object that contains information about which barcode types are supported for each printer to control.
3-2 Properties 3-2-1 barNumber
Define Barcode Number @property int barNumber
[Discussion]
The barNumber is saved automatically by collecting information from the connected printer.
[Availability]
SDK 1.0.0 and later
3-2-2 name
Barcode Name @property(readwrite) NSString * name
[Discussion]
The name is saved automatically by collecting information from the connected printer.
[Availability]
SDK 1.0.0 and later
3-2-3 support
Barcode Availability @property BOOL support
[Discussion]
The support is saved automatically by collecting information from the connected printer.
[Availability]
SDK 1.0.0 and later
Rev. 1.00
ZQ110
- 17 -
Mobile Printer iOS SDK API Reference Guide
Inherits from
NSObject
Confirms to
Framework
BXPrinter.a
[Availability]
iOS Printer SDK 1.0.0 and later
Declared
BXPrinterObject.h
4. BXPrinter Class Reference
4-1 Overview
BXPrinter Class contains the information of the control target printer (name/network address/port).
4-2 Properties 4-2-1 name
Printer Name @property(readonly) NSString * name
[Discussion]
The name is saved automatically by collecting information from the connected printer.
[Availability]
SDK 1.0.0 and later
4-2-2 address
For Wifi Printer, The address is ip address of Printer For Bluetooth Printer, The address is ConnectionID of Printer
@property(readwrite) NSString * address
[Discussion]
Target Printer should be assigned first before making a connection Refer to 5-3-6 connect regarding connection
[Availability]
SDK 1.0.0 and later
4-2-3 port
For ZQ110 Wifi model, 9100 port is usually used @property(readwrite) unsigned short port
[Availability]
SDK 1.0.0 and later
Rev. 1.00
ZQ110
- 18 -
Mobile Printer iOS SDK API Reference Guide
4-2-4 modelStr
Model Name of Printer The model name is provided by the firmware. For the ZQ110 printer, _ZQ110 is returned. @property(readwrite) NSString * modelStr
[Discussion]
This value is updated by the checkPrinter method of BXPrinterController.
[Availability]
SDK 1.0.0 and later
4-2-5 versionStr
Firmware Version of Printer The version name is provided by the firmwareFor the ZQ110, it is in the form of _V01.00
STOB 040711. @property(readwrite) NSString * versionStr
[Discussion]
This value is updated by the checkPrinter method of BXPrinterController.
[Availability]
SDK 1.0.0 and later
4-2-6 macAddress
Mac Address of Printer @property(readwrite) NSString * macAddress
[Availability]
SDK 1.0.0 and later
4-2-7 connectionClass
Printer interface type. This value represents the way that the printer is connected. Refer to 2-13 Connection
Class. @property(readwrite) unsigned short * connectionClass
[Availability]
SDK 1.0.0 and later
4-2-8 bluetoothDeviceName
Bluetooth Device Name. The name‟ is saved automatically by collecting information from the connected printer. @property(readOnly) NSString * bluetoothDeviceName
[Availability]
SDK 1.0.0 and later
Rev. 1.00
- 19 -
Mobile Printer iOS SDK API Reference Guide
Inherits from
NSObject
Confirms to
Framework
BXPrinter.a
[Availability]
iOS Printer SDK 1.0.0 and later
Declared
BXPrinter.h
5. BXPrinterController Class Reference
5-1 Overview
BXPrinterController Class is the main object for printer control.
5-2 Properties 5-2-1 version
SDK Version @property(readonly) NSString * version
[Discussion]
SDK Version is a read-only string in the form of “1.0.0”.
[Availability]
SDK 1.0.0 and later
5-2-2 delegate
Assign the Object to Apply BXPrinterControlDelegate Method @property(readwrite) id<BXPrinterControlDelegate> delegate
[Availability]
SDK 1.0.0 and later
5-2-3 target
Control Target Printer Object @property(readwrite) BXPrinter * target
[Discussion]
The control target printer object should be assigned before starting printer control.
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
ZQ110
- 20 -
Mobile Printer iOS SDK API Reference Guide
5-2-4 lookupDuration
Printer Lookup Time (unit: second) @property(readwrite) CGFloat lookupDuration
[Discussion]
The value could be a fractional number such as 0.5.
[Availability]
SDK 1.0.0 and later
5-2-5 lookupCount
Number of Repeats on Signal Transmission for Printer Search @property(readwrite) unsigned lookupCount
[Discussion]
The default value is set to 1. When this value is set to a number larger than 1, the printer search signal transmission is repeated by this number at intervals of 0.2 seconds.
[Availability]
SDK 1.0.0 and later
5-2-6 alignment
Horizontal Alignment Setting @property(readwrite) int alignment
[Discussion]
The default value is set to left alignment. This setting affects all output printing, including text and bar code.
[Availability]
SDK 1.0.0 and later
5-2-7 attribute
Text Printing Property @property(readwrite) int attribute
[Discussion]
Refer to 2-5 Text Attribute
[Availability]
SDK 1.0.0 and later
Rev. 1.00
ZQ110
- 21 -
Mobile Printer iOS SDK API Reference Guide
5-2-8 textSize
Size of the Printed Text @property(readwrite) int textSize
[Discussion]
Refer to 2-4 Text Size
[Availability]
SDK 1.0.0 and later
5-2-9 characterSet
Printer Code Page @property(readwrite) CGFloat characterSet
[Discussion]
Refer to 2-1 Character Set. Default value is set to BXL_CS_437.
[Availability]
SDK 1.0.0 and later
5-2-10 internationalCharacterSet
International Character Set
@property(readwrite) char internationalCharacterSet
[Discussion]
Refer to 2-2 International Character Set. Default value is set to BXL_CS_USA.
[Availability]
SDK 1.0.0 and later
5-2-11 textEncoding
Type of Text Encoding. @property(readwrite) long textEncoding
[Discussion]
Refer to NSStringEncoding in NSString.h (https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Cla sses/NSString_Class/Reference/NSString.html#//apple_ref/doc/c_ref/NSStringEncoding)
[Availability]
SDK 1.0.0 and later
Rev. 1.00
- 22 -
Mobile Printer iOS SDK API Reference Guide
5-2-12 state
Printer State Code This value is updated when checkPrinter method of BXPrinterController is called. @property(readonly) long state
[Discussion]
Refer to 2-10 State
[Availability]
SDK 1.0.0 and later
5-2-13 power
Printer Power
@property(readonly) long state
[Discussion]
Refer to 2-9 Power
[Availability]
SDK 1.0.0 and later
5-2-14 AutoConnection
Printer Connection @property(assign) int AutoConnection
[Discussion]
Refer to 2-11 Connection Control
[Availability]
SDK 1.0.0 and later <Note>
Printer connection is controlled automatically without using connect/disconnect
function in the automatic connection mode.
Consecutive use of printText function may slow down the printing speed because
most functions have a connect/disconnect job at the beginning and end of it. Use the manual connection mode to address this issue.
5-2-15 errorCorrection
Sets the error correction level of the QR code @property(assign) int errorCorrection
[Discussion]
Refer to 2-11 Connection Control
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
ZQ110
- 23 -
Mobile Printer iOS SDK API Reference Guide
5-3 Instance Methods 5-3-1 getInstance
Obtain the BXPrinterController Class Instance
[Function prototype]
- (BXPrinterController)getInstance [Return Value]
BXPrinterController class is created and returned automatically the first time that this method is called.The existing BXPrinterController class is returned thereafter.
[Discussion]
Because BXPrinterController class uses only one instance in one process, it is recommended that you allow the class instance to be created automatically instead of creating it manually.
[Availability]
SDK 1.0.0 and later
5-3-2 open
Initialization Task for Using BXPrinterController Class (memory allocation and background thread operation)
[Function prototype]
- (void)open [Discussion]
- This task should be performed before calling the main delegate of applications such as
(void)applicationDidBecomeActive:(UIApplication *).
[Availability]
SDK 1.0.0 and later
5-3-3 close
Deallocate Resources Resources are deallocated while stopping or terminating the use of BXPrinterController
class.
[Discussion]
- This task should be performed before calling the main delegate of applications such as (void)applicationWillResignActive:(UIApplication *). When the close method is not called and applications using BXPrinterController are running in the background, simultaneous use of BXPrinterController by other applications could be restricted.
[Availability]
SDK 1.0.0 and later
Rev. 1.00
ZQ110
- 24 -
Mobile Printer iOS SDK API Reference Guide
5-3-4 lookup
Wireless Lookup The following printers are searched:
- Paired Bluetooth printers with iPhone
- Printers in the same WiFi network where iPhone is connected
[Function prototype]
- (void)lookup [Discussion]
Start/End of search and searched printers can be obtained through BXPrinter ControlDelegate. Each iPhone has two network adaptors including 3G and WiFi networks, and the lookup method searches WiFi only. No operation takes place when there is no connected WiFi.
[Availability]
SDK 1.0.0 and later
5-3-5 selectTarget
Initialization Task for Object of Specified Target
[Function prototype]
- (long)selectTarget
- (long)selectTarget : (int) modelID
[Parameters]
modelID
- Select the type of printer.
- You do not need to input it but it will be automatically allocated. Refer to 2-12 Model ID.
[Return Value]
Refer to 2-14 Result Code
[Discussion]
The target of BXPrininterController should be set in advance.
[Availability]
SDK 1.0.0 and later
Rev. 1.00
- 25 -
Mobile Printer iOS SDK API Reference Guide
5-3-6 connect
Connect to Target Printer
[Function prototype]
- (BOOL)connect [Discussion]
This method does not work when AutoConnection is set using BXL_CONNECTIONMODE_AUTO(default, == 0)
The target of BXPrininterController should be set in advance.
[Availability]
SDK 1.0.0 and later
5-3-7 disconnect
Disconnect from the Connected Printer
[Function prototype]
- (void)disconnect [Discussion]
This method does not work when AutoConnection is set using BXL_CONNECTIONMODE_AUTO(default, == 0).
[Availability]
SDK 1.0.0 and later
5-3-8 disconnectWithTimeout
Disconnect from the Connected Printer with Timeout If data remains in the buffer, this remaining data will be transmitted to the printer.
[Function prototype]
- (void)disconnectWithTimeout:(int)timeout [Parameters]
int timeout
(timeout == 0)
The timeout is not used. Disconnects the connected printer immediately even if data exist in the buffer.
(timeout < 0)
The connection is not disconnected until the data remaining in the buffer have been transmitted to the printer. This transmission can take a long time if the data­size is large.
(timeout > 0)
If data remains in the buffer, this remaining data will be transmitted to the printer for the duration specified by the timeout value, and then the connected printer is disconnected.
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
- 26 -
Mobile Printer iOS SDK API Reference Guide
5-3-9 isConnected
Returns the Connection State of the Printer
[Return Value]
TRUE if the printer is connected. FALSE if the printer is not connected.
[Function prototype]
- (BOOL)isConnected [Availability]
SDK 1.0.0 and later
5-3-10 enableLSB
Enable Last sStatus Back
[Function prototype]
- (long)enableLSB:(BOOL)bEnable [Parameters]
bEnable
LSB Enable. FALSE : LSB Disable TRUE : LSB Enable
[Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
5-3-11 printText
Print Text No action takes place if no printer is connected.
[Function prototype]
- (long)printText:(NSString *)string
[Parameters]
string
Unicode data with null terminator. Print target text string.
[Return Value]
Refer to 2-14 Result Code
[Discussion]
Text alignment property should be set in advance.
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
- 27 -
Mobile Printer iOS SDK API Reference Guide
5-3-12 printBox
Print Box Shape for Text No action takes place if no printer is connected.
[Function prototype]
(long)printText:(int)width height: (int)height;
[Parameters]
int
Specify the width of the box. 1 == width equivalent to that of one character
int
Specify the length of the box. 1 == length equivalent to that of one character
[Return Value]
Refer to 2-14 Result Code
[Discussion]
Alignment and properties of the text should be defined in advance.
[Availability]
SDK 1.0.0 and later
5-3-13 lineFeed
Perform Line Feed
[Function prototype]
- (void)linefeed:(int)lines
[Parameters]
lines
Number of lines to advance.
[Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
ZQ110
- 28 -
Mobile Printer iOS SDK API Reference Guide
5-3-14 nextPrintPos
Feed Paper to Beginning of Next Label
[Function prototype]
- (long)nextPrintPos
[Return Value]
Refer to 2-14 Result Code
[Discussion]
This method works only when in label mode.
[Availability]
SDK 1.0.0 and later
5-3-15 printBarcode
Print One-Dimensional and Two-Dimensional Barcode
[Function prototype]
- (long)printBarcode:(char *)data
symbology:(long)symbology width:(long)width height:(long)height alignment:(long)alignment textPosition:(long)textPosition
[Parameters]
data
ANSI code data with null terminator. Transfer barcode data to print.
symbology
Define barcode type.
width
Width of barcode. Valid range is 2 to 7.
Barcode printing may not work properly if the width of the barcode print exceeds
the printer paper width.
This setting does not affect 2-dimensional barcodes.
height
Height of barcode in number of dots Range is 1 to 255.
This setting does not affect 2-dimensional barcodes.
alignment
Barcode alignment setting Refer to 2-3 Barcode/Text Alignment
textPosition
Barcode text position setting Refer to 2-6 Barcode Text Position
[Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
Rev. 1.00
- 29 -
Mobile Printer iOS SDK API Reference Guide
5-3-16 printBitmap
Value
Description
0 ~ 100
Color level value
If fourth digit is 1
Enable diffusion processing
If fifth digit is 1
Image print using ESC * command
Print Image File
[Function prototype]
- (long)printBitmap:(NSString *)path
width:(long)width
alignment:(long)alignment level:(long)level
[Parameters]
path
Path of image file
width
Width of image file to convert. Valid setting range is 0 to maximum width. Image is resized with the given condition when the value is less than 0. Refer to 2-8 Image Width
alignment
Image alignment setting Refer to 2-3 Image Alignment
level
Color level and diffusion processing option of image
ZQ110
Note: What is Error Diffusion?
Error Diffusion is a method to present the color image or black-and-white image with fewer bits/pixel, which may produce few visible patterns (such as a snake-like pattern for a certain type of image) but in general, the capability of sharp representation is excellent. The disadvantage to this method is a long processing time because errors are measured and an amount of computing is required for distributing the errors to neighboring pixels.
It is recommended that you use the diffusion algorithm with this SDK.
[Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
Rev. 1.00
ZQ110
- 30 -
Mobile Printer iOS SDK API Reference Guide
5-3-17 checkPrinter
Check the Printer States and Update the Printer State Property
[Function prototype]
- (long)checkPrinter [Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
5-3-18 msrReadReady
Switch the Printer to MSR Ready state
[Function prototype]
- (long)msrReadReady [Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
5-3-19 msrReadCancel
Release the MSR Ready State of the Printer
[Function prototype]
- (long)msrReadCancel
[Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
5-3-20 msrReadCancelEx
Release the MSR Ready State of the Printer The delegate "msrTerminated" below can be invoked after this method has been finished. Refer To 6-2-11 msrTerminated
[Function prototype]
- (long)msrReadCancelEx
[Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
Rev. 1.00
ZQ110
- 31 -
Mobile Printer iOS SDK API Reference Guide
5-3-21 msrReadTrack
Read MSR Data on the track 1,2 and 3 In MSR read mode, if BXLMSR_DATAEMPTY is returned, the card is not read in MSR.
Scan the card with MSR again, or use the msrReadCancel method to cancel the read mode.
[Function prototype]
- (long)msrReadTrack:(NSData **)data1 data2:(NSData **)data2 data3:(NSData **)data3
[Parameters]
data1
Read MSR Data Track 1 and save it.
data2
Read MSR Data Track 2 and save it.
data3
Read MSR Data Track 3 and save it.
[Return Value]
Refer to 2-14 Result Code
[Discussion]
All of data1, data2, and data3 carry unallocated NSData *data. The NSData object is allocated inside the method. The allocated data1, data2, and data3 are auto released, and users do not have to release them explicitly.
[Availability]
SDK 1.0.0 and later
5-3-22 msrGetTrack
Read MSR data on the specific track InMSR read mode,if BXLMSR_DATAEMPTY is returned, the card is not read in MSR.
Scan the card with MSR again, or use the msrReadCancel method to cancel the read mode.
[Function prototype]
- (long)msrGetTrack:(int)track
response:(NSData **)response
[Parameters]
track
MSR Data Track number 1 to 3
response
MSR Data Track value
[Return Value]
Refer to 2-14 Result Code
Rev. 1.00
ZQ110
- 32 -
Mobile Printer iOS SDK API Reference Guide
[Discussion]
The response carries unallocated NSData *data.The NSData object is allocated inside the method. The response is auto released, and users do not have to release it explicitly.
[Availability]
SDK 1.0.0 and later
5-3-23 msrReadFullTrack
Read Entire MSR Data In MSR read mode, if BXLMSR_DATAEMPTY is returned, the card is not read in MSR.
Scan the card with MSR again, or use the msrReadCancel method to cancel the read mode.
[Function prototype]
- (long)msrReadFullTrack:(NSData **)response
[Parameters]
response
MSR Data Track value
[Return Value]
Refer to 2-14 Result Code
[Discussion]
The response carries unallocated NSData *data. The NSData object is allocated inside the method. The response is auto released, and users do not have to release it explicitly.
[Availability]
SDK 1.0.0 and later
5-3-24 directIO
Send or Read User Defined Data.
[Function prototype]
- (long)directIO:(NSData *)request
requiredSize:(NSInteger) requiredSize
response:(NSData **)response
[Parameters]
request
Data to be sent to printer, ANSI CODE data requiredSize
It contains the expected size of the response from the printer.
response
Response sent from printer is returned
[Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
Rev. 1.00
- 33 -
Mobile Printer iOS SDK API Reference Guide
5-3-25 nvImageList
Read List of Image Addresses Saved in the NV Area
[Function prototype]
- (long)nvImageList:(NSArray **)images
[Parameters]
images
The address list is provided. Each address is saved in the form of NSNumber *. The images are autoreleased, and users do not have to release them explicitly.
[Return Value]
Refer to 2-14 Result Code
[Discussion]
<Example > NSArray *images;
[[BXPrinterController getInstance()] nvImageList:&images]; for( NSNumber *n in images) { NSLog(@”%d”, [NSNumber intValue]); }
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
- 34 -
Mobile Printer iOS SDK API Reference Guide
5-3-26 downloadNVImage (Diffusion)
Value
Description
0 ~ 100
Color level value
If fourth digit is 1
Enable diffusion processing
If fifth digit is 1
Image print using ESC * command
Download Image Data Corresponding to the Address Saved in the NV Area
[Function prototype]
- (long)downloadNVImage:(int)address
withImage:(UIImage *)image width:(long)width level:(long)level
[Parameters]
address
Image address in the range of 0 to 99. If there is an image saved for the
corresponding address, the existing image is replaced by the new image.
images
Download target image object
width
Width of the image to print
The image will be printed with the maximum width that can be supported by the printer when BXL_WIDTH_FULL is input or input value of width is
invalid.
The image will be enlarged if the input value of width is larger than the width of actual image. Then the image will be reduced if the input value of width is smaller than the width of actual image.
level
Color level and diffusion processing option of image
ZQ110
Note: What is Error Diffusion?
Error Diffusion is a method to present the color image or black-and-white image with fewer bits/pixel, which may produce few visible patterns (such as a snake-like pattern for a certain type of image) but in general, the capability of sharp representation is excellent. The disadvantage to this method is a long processing time because errors are measured and an amount of computing is required for distributing the errors to neighboring pixels.
It is recommended that you use the diffusion algorithm with this SDK.
[Return Value]
Refer to 2-14 Result Code
[Discussion]
When the width of the image is wider than the width of printer, the image is resized automatically.
[Availability]
SDK 1.0.0 and later
Rev. 1.00
ZQ110
- 35 -
Mobile Printer iOS SDK API Reference Guide
5-3-27 downloadNVImage (Normal)
Download Image Data to the Designated Address in the NV Area.
[Function prototype]
- (long)downloadNVImage:(int)address
withImage:(UIImage *)image
[Parameters]
address
Image address in the range of 0 to 99. If there is an image saved for the
corresponding address, the existing image is replaced by a new image.
images
Download target image object
[Return Value]
Refer to 2-14 Result Code
[Discussion]
When the width of the image is wider than the width of the printer, the image is resized. automatically. The width value is set to BXL_WIDTH_FULL and the image data is processed with a level of 1050, 50% of brightness, and the error diffusion algorithm enable settings are downloaded.
[Availability]
SDK 1.0.0 and later
5-3-28 printNVImage
Print Image Data to the Designated Address in the NV Area
[Function prototype]
- (long)printNVImage:(int)address
[Parameters]
address
Image address in the range of 0 to 9
[Return Value]
Refer to 2-14 Result Code.
[Discussion]
The image is not printed if the image does not exist in the corresponding address.
[Availability]
SDK 1.0.0 and later
Rev. 1.00
- 36 -
Mobile Printer iOS SDK API Reference Guide
5-3-29 removeNVImage
Delete Image Data from the Designated Address in the NV Area.
[Function prototype]
- (long)removeNVImage:(int)address
[Parameters]
address
Image address in the range of 0 to 99
[Return Value]
Refer to 2-14 Result Code
[Discussion]
No action takes place if the image does not exist in the corresponding address.
[Availability]
SDK 1.0.0 and later
5-3-30 removeAllNVImages
Delete All Image Data from the Designated Address in the NV Area
[Function prototype]
- (long)removeAllNVImages
[Return Value]
Refer to 2-14 Result Code
[Availability]
SDK 1.0.0 and later
5-3-31 isSupport_MSR
Check Whether a Specific Feature of the MSR is Supported
[Function prototype]
- (BOOL)isSupport_MSR
[Return Value]
If the feature of the MSR is supported, the value returned is TRUE.
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
- 37 -
Mobile Printer iOS SDK API Reference Guide
5-3-32 isSupport_LSB
Check Whether a Specific Feature of the LSB is Supported
[Function prototype]
- (BOOL)isSupport_MSR
[Return Value]
If the feature of the LSB is supported, the value returned is TRUE
[Availability]
SDK 1.0.0 and later
5-3-33 isSupport_Barcode
Checks whether the printer can print barcodes.
[Function prototype]
- (BOOL)isSupport_Barcode
[Return Value]
TRUE if printing barcodes is supported. FALSE if printing barcodes is not supported.
[Availability]
SDK 1.0.0 and later
5-3-34 getBarcodeSupportTable
Check that the Barcode Print Function is Supported
[Function prototype]
- (NSMutableArray*)getBarcodeSupportTable
[Return Value]
A NSMutableArray that contains BXBarcode is returned.
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
- 38 -
Mobile Printer iOS SDK API Reference Guide
Inherits from
NSObject
Confirms to
Framework
BXPrinter.a
[Availability]
iOS Printer SDK 1.0.0 and later
Declared
BXPrinteControlDelegater.h
6. BXPrinterControllerDelegate Protocol Reference
6-1 Overview
This receives events occurring in the BXPrinterController class.
6-2 Instance Methods 6-2-1 didStart
Called When Class Use is Started Using Open Method of BXPrinterController It is called after printer connection is completed.
[Function prototype]
- (void) didStart
[Parameters]
controller
BXPrinterController object that generates events
[Discussion]
Used to indicate the beginning of the use of printer class to users.
[Availability]
SDK 1.0.0 and later
6-2-2 didStop
Called When Class Use is Stopped Using Open Method of BXPrinterController
[Function prototype]
- (void) didStop
[Parameters]
controller
BXPrinterController object that generates events
[Discussion]
Used to indicate the termination of the use of printer class.
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
ZQ110
- 39 -
Mobile Printer iOS SDK API Reference Guide
6-2-3 didFindPrinter
Called for Each Printer When Another Printer is Discovered from the Same Network.
[Function prototype]
- (void)didFindPrinter:(BXPrinterController *)controller
printer:(BXPrinter *)printer
[Parameters]
controller
BXPrinterController object that generates events
printer
Information of discovered printer
[Discussion]
If same printer responds multiple times during the printer lookup process, this method is called only once the first time.
[Availability]
SDK 1.0.0 and late
6-2-4 didConnect
Called When a Connection to a Printer is Finished.
[Function prototype]
- (void)didConnect:(BXPrinterController *)controller [Discussion]
If you need to have more information about target printers, please refer to target properties in BXPrinterController.
[Availability]
SDK 1.0.0 and later
6-2-5 didNotConnect
Called when connection to printer cannot be made.
[Function prototype]
- (void)didNotConnect:(BXPrinterController *)controller
withError:(NSError *)error
[Parameters]
controller
BXPrinterController object that generates events
error
Information regarding the cause of failure
[Discussion]
Used when there is an error during the printer connection stage.
[Availability]
SDK 1.0.0 and later
Rev. 1.00
- 40 -
Mobile Printer iOS SDK API Reference Guide
6-2-6 willLookupPrinters
Called Before Starting Printer Search
[Function prototype]
- (void)willLookupPrinters:(BXPrinterController *)controller
[Parameters]
controller
BXPrinterController object that generates events
[Discussion]
Used to indicate the start of the printer search.
[Availability]
SDK 1.0.0 and later
6-2-7 didLookupPrinters
Called When Printer Search is Completed
[Function prototype]
- (void)didLookupPrinters:(BXPrinterController *)controller
[Parameters]
controller
BXPrinterController object that generates events
[Discussion]
Used to indicate the search status to users.
[Availability]
SDK 1.0.0 and later
6-2-8 didNotLookup
Called When Printer Search Cannot be Performed
[Function prototype]
- (void)didNotLookup:(BXPrinterController *)controller
withError:(NSError *)error
[Parameters]
controller
BXPrinterController object that generates events
error
Information regarding the cause of failure
[Discussion]
Used when lookup fails when the printer is connected to WiFi or Bluetooth.
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
ZQ110
- 41 -
Mobile Printer iOS SDK API Reference Guide
6-2-9 didBeBrokenConnection
Called When the Connection to Printer is Broken
[Function prototype]
- (void)didBeBrokenConnection:(BXPrinterController *)controller
withError:(NSError *)error
[Parameters]
controller
BXPrinterController object that generates events
error
Information regarding the cause of failure
[Discussion]
This method is called only when the connection is interrupted by external problem other than user intervention. It is not called when a user breaks the connection by calling the close method of BXPrinterController. Refer to the target property of BXPrinterController for the information of target printer.
[Availability]
SDK 1.0.0 and later
6-2-10 msrArrived
Called When MSR Data Arrives Correctly in MSR Read Mode
[Function prototype]
- (void)msrArrived:(BXPrinterController *)controller
track:(NSNumber *)track
[Parameters]
controller
BXPrinterController object that generates events
track
Track number 1 to 3 for MSR data
[Discussion]
After this method is called, the MSR data of the corresponding track can be obtained through the getTrack: method of BXPrinterController.
[Availability]
SDK 1.0.0 and later
Rev. 1.00
- 42 -
Mobile Printer iOS SDK API Reference Guide
6-2-11 msrTerminated
Called When MSR Read Mode to Terminated
[Function prototype]
- (void)msrTerminated:(BXPrinterController *)controller
[Parameters]
controller
BXPrinterController object that generates events
[Availability]
SDK 1.0.0 and later
6-2-12 didUpdateStatus
Called When Printer Status Variable has Changed
[Function prototype]
- (void)didUpdateStatus:(BXPrinterController *)controller
Status(NSNumber*) status
[Parameters]
controller
BXPrinterController object that generates events
status
Information regarding the current status of the printer
[Availability]
SDK 1.0.0 and later
ZQ110
Rev. 1.00
www.zebra.com
Zebra Technologies International, LLC Zebra Technologies Europe Limited
475 Half Day Road Dukes Meadow
Suite 500, Lincolnshire
Illinois 60069 USA
Phone: +1.847.634.6700
Toll-Free: +1.800.230.9494
Fax: +1.847.913.8766
Millboard Road
Bourne End
Buckinghamshire, SL8 5XF, UK
Phone: +44 (0)1628 556000
Fax: +44 (0)1628 556001
Loading...