ZQ110 Mobile Printer iOS SDK API Reference Guide P1069077-001 Rev.
ZQ110 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 .......................
ZQ110 5-3 Instance Methods ................................................................................................................................... 23 5-3-1 getInstance .............................................................................................................................. 23 5-3-2 open ......................................................................................................................................... 23 5-3-3 close ......................................
ZQ110 ■ 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 equipment described herein. Such proprietary information may not be used, reproduced, or disclosed to any other parties for any other purpose without the expressed written permission of Zebra Technologies Corporation.
ZQ110 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.
ZQ110 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.
ZQ110 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.
ZQ110 1-4 Supported Properties List Method/Property getInstance open close lookup selectTarget connect disconnect disconnectWithTimeout isConnected enableLSB printText printBox lineFeed nextPrintPos printBarcode printBitmap checkPrinter msrReadReady msrReadCancel msrReadCancelEx msrReadTrack msrGetTrack msrReadFullTrack directIO nvImageList downloadNVImage (Diffusion) downloadNVImage (Normal) printNVImage removeNVImage removeAllNVImages isSupport_MSR isSupport_LSB isSupport_Barcode getBarcodeSupportTable R
ZQ110 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.
ZQ110 2-2 International Character Set The following table defines the available international character set. The default value is set to BXL_ICS_USA. Code BXL_ICS_USA BXL_ICS_FRANCE BXL_ICS_GERMANY BXL_ICS_UK BXL_ICS_DENMARK1 BXL_ICS_SWEDEN BXL_ICS_ITALY BXL_ICS_SPAIN BXL_ICS_NORWAY BXL_ICS_DENMARK2 BXL_ICS_SPAIN2 BXL_ICS_LATIN_AMERICA BXL_ICS_KOREA Value 0 1 2 3 4 5 6 7 9 10 11 12 13 Description U.S.A. France Germany U.K.
ZQ110 Code BXL_TS_0HEIGHT BXL_TS_1HEIGHT BXL_TS_2HEIGHT BXL_TS_3HEIGHT BXL_TS_4HEIGHT BXL_TS_5HEIGHT BXL_TS_6HEIGHT BXL_TS_7HEIGHT Value 0 16 32 48 64 80 96 112 Description Set the ratio of vertical height to X1 Set the ratio of vertical height to X2 Set the ratio of vertical height to X3 Set the ratio of vertical height to X4 Set the ratio of vertical height to X5 Set the ratio of vertical height to X6 Set the ratio of vertical height to X7 Set the ratio of vertical height to X8 2-5 Text Attribute The f
ZQ110 2-7 Barcode Symbology The following table defines the available bar code types.
ZQ110 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. Code Value BXL_WIDTH_FULL -1 BXL_WIDTH_NONE -2 Description Value is set to max width and the image is resized to the full paper size Image is not resized 2-9 Power The read-only Power setting indicates the remaining battery capacity of the printer. A change of battery status is shown automatically.
ZQ110 2-11 Connection Control The following table defines the type of printer connection. Code BXL_CONNECTIONMODE_AUTO BXL_CONNECTIONMODE_NOAUTO Value 0 100 Description Automatic connect mode Not automatic connect mode 2-12 Model ID The model ID defines the type of printer. Available settings are as follows. Code BXL_MODEL_ID_ZQ110 Value 0x12001003 Description ZQ110 2-13 Connection Class When the method 'didFindPrinter' is called, this value is updated to connectionClass in BXPrinter class.
ZQ110 2-14 Result Code The following table defines the possible result codes.
ZQ110 3. BXBarcode Class Reference Inherits from Confirms to Framework [Availability] Declared NSObject BXPrinter.a iOS Printer SDK 1.0.0 and later BXBarcodeInfo.h 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.
ZQ110 4. BXPrinter Class Reference Inherits from Confirms to Framework [Availability] Declared NSObject BXPrinter.a iOS Printer SDK 1.0.0 and later BXPrinterObject.h 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.
ZQ110 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.
ZQ110 5. BXPrinterController Class Reference Inherits from Confirms to Framework [Availability] Declared NSObject BXPrinter.a iOS Printer SDK 1.0.0 and later BXPrinter.h 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.
ZQ110 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.
ZQ110 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.
ZQ110 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.
ZQ110 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.
ZQ110 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.
ZQ110 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).
ZQ110 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.
ZQ110 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.
ZQ110 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.
ZQ110 5-3-16 printBitmap 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.
ZQ110 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.
ZQ110 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.
ZQ110 [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.
ZQ110 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.
ZQ110 5-3-26 downloadNVImage (Diffusion) 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.
ZQ110 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.
ZQ110 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.
ZQ110 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.
ZQ110 6. BXPrinterControllerDelegate Protocol Reference Inherits from Confirms to Framework [Availability] Declared NSObject BXPrinter.a iOS Printer SDK 1.0.0 and later BXPrinteControlDelegater.h 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.
ZQ110 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.
ZQ110 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.
ZQ110 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.
ZQ110 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.
www.zebra.com Zebra Technologies International, LLC Zebra Technologies Europe Limited 475 Half Day Road Dukes Meadow Suite 500, Lincolnshire Millboard Road Illinois 60069 USA Bourne End Phone: +1.847.634.6700 Buckinghamshire, SL8 5XF, UK Toll-Free: +1.800.230.9494 Phone: +44 (0)1628 556000 Fax: +1.847.913.