background image

 

 

 

iOS SDK API Reference Guide 

POS Printer 

 

Rev. 2.00

 

SRP-F310 / SRP-F312 
SRP-350plus / SRP-352plus 
SRP-350plusII / SRP-352plusII 
SRP-350II / SRP-350IIOBE 
SRP-350III / SRP-352III   
SRP-275 / SRP-275II 

 

 

 

 

http://www.bixolon.com

 

Summary of Contents for SRP-275

Page 1: ...iOS SDK API Reference Guide POS Printer Rev 2 00 SRP F310 SRP F312 SRP 350plus SRP 352plus SRP 350plusII SRP 352plusII SRP 350II SRP 350IIOBE SRP 350III SRP 352III SRP 275 SRP 275II http www bixolon com ...

Page 2: ... 2 14 Model ID 11 2 15 Connection Class 11 2 16 Result Code 12 3 BXBarcode Class Reference 14 3 1 Overview 14 3 2 Properties 14 3 2 1 barNumber 14 3 2 2 name 14 3 2 3 support 14 4 BXPrinter Class Reference 15 4 1 Overview 15 4 2 Properties 15 4 2 1 name 15 4 2 2 address 15 4 2 3 port 15 4 2 4 modelStr 16 4 2 5 versionStr 16 4 2 6 connectionClass 16 5 BXPrinterController Class Reference 17 5 1 Over...

Page 3: ... 31 5 3 25 icGetStatus 31 5 3 26 nvImageList 32 5 3 27 downloadNVImage Diffusion 33 5 3 28 downloadNVImage Normal 34 5 3 29 printNVImage 34 5 3 30 removeNVImage 35 5 3 31 removeAllNVImages 35 5 3 32 openDrawer 35 5 3 33 isSupport_MSR 36 5 3 34 isSupport_IC 36 5 3 35 isSupport_Config 36 5 3 36 isSupport_CashDrawer 36 5 3 37 isSupport_LSB 37 5 3 38 getBarcodeSupportTable 37 6 BXPrinterControllerDele...

Page 4: ...velopment Environment Platform iOS 4 3 or higher Development environment XCode 3 2 6 or higher 1 2 Supported Platform Supported Devices Compatibilities of the following list of devices were verified Besides the devices in the list it is compatible with iPod touch second generation or later version iPhone 3GS 4G 5G iPad iPad2 iPad mini 1 3 Supported Properties List Method Property POS Printer Versi...

Page 5: ...O printBarcode O printBitmap O checkPrinter O msrReadReady X msrReadCancel X msrReadTrack X msrGetTrack X msrReadFullTrack X directIO O icON X icOFF X icApdu X icGetStatus X nvImageList O downloadNVImage Diffusion O downloadNVImage Normal O printNVImage O removeNVImage O removeAllNVImages O openDrawer O isSupport_MSR O isSupport_IC O isSupport_Config O isSupport_CashDrawer O isSupport_LSB O getBar...

Page 6: ...WPC1252 BXL_CS_PC866 17 Code page PC860 BXL_CS_PC852 18 Code page PC852 BXL_CS_PC858 19 Code page PC858 BXL_CS_PC864 22 Code page PC864 BXL_CS_THAI42 23 Code page THAI42 BXL_CS_WPC1253 24 Code page WPC1253 BXL_CS_WPC1254 25 Code page WPC1254 BXL_CS_WPC1257 26 Code page WPC1257 BXL_CS_FARSI 27 Code page FARSI BXL_CS_WPC1251 28 Code page WPC1251 BXL_CS_PC737 29 Code page PC737 BXL_CS_PC775 30 Code p...

Page 7: ...tings are as follows Code Value Description BXL_ALIGNMENT_LEFT 0 Left align BXL_ALIGNMENT_CENTER 1 Center align BXL_ALIGNMENT_RIGHT 2 Right align 2 4 Text Size This defines the settings for the text size and horizontal and vertical ratio can be defined simultaneously with OR operation Available settings are as follows Code Value Description BXL_TS_0WIDTH 0 Set the ratio of horizontal width to X1 B...

Page 8: ...Text Attribute This is a text property and each property can be combined with OR operation Available settings are as follows 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 BXL_ExFT_CHINA_FONT...

Page 9: ...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 202 203 2 n 928 0 data 255 BXL_BCS_DATAMATRIX 204 2 n 928 0 data 255 BXL_BCS_MAXICODE 205 6 2 n 928 0 data 255 2 8 Image Width Set the width of image and valid range is 0 max ...

Page 10: ...ecked 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 Code Value Description BXL_STS_NORMAL 0 Normal BXL_STS_PAPEREMPTY 1 No paper BXL_STS_CONVEROPEN 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_ST...

Page 11: ...escription BXL_MODEL_ID_SPPR200II 0x12000002 SPP R200II BXL_MODEL_ID_SRPR300 0x13000000 SPP R300 BXL_MODEL_ID_SPPR400 0x14000000 SPP R400 BXL_MODEL_ID_SRP350II 0x23500002 SRP 350II BXL_MODEL_ID_SRP350plus 0x23507000 SRP 350plus BXL_MODEL_ID_SRP352plus 0x23527000 SRP 352plus BXL_MODEL_ID_SRP350plusII 0x23507002 SRP 350plusII BXL_MODEL_ID_SRP352plusII 0x23527002 SRP 352plusII BXL_MODEL_ID_SRP350III ...

Page 12: ...R 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 1001H Unknown command 1002H Command cannot be executed 1003H Incorrect number of arguments 1004H First byte of unknown command of invalid command 1005H Response time out 1010H Response error du...

Page 13: ... been set to IC CARD mode 10B0H PC link command is not supported 10E4H The card has just sent an invalid Procedure byte 10E5H The card has interrupted an exchange 10E7H Card returns an error 10F7H Card is removed while executing a command 10F8H Card is not useable because it is electrically damaged 10FBH Card recognition failure or car entry failure ...

Page 14: ...er property int barNumber Discussion Printer name is saved automatically by collecting information from the connected printer Availability SDK 3 0 3 and later 3 2 2 name Barcode Name property readwrite NSString address Discussion Printer name is saved automatically by collecting information from the connected printer Availability SDK 3 0 3 and later 3 2 3 support The availability of the barcode pr...

Page 15: ... NSString name Discussion Printer name is saved automatically by collecting information from the connected printer Availability SDK 0 6 0 and later 4 2 2 address Network address of printer property readwrite NSString address Discussion Network address of the printer should be assigned first before connection Availability SDK 0 6 0 and later 4 2 3 port Network port of printer property readwrite uns...

Page 16: ... 4 2 5 versionStr Firmware version of printer Version name is provided by firmware and 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 0 8 0 and later 4 2 6 connectionClass Printer interface type This value represents the way that the printer is connected Refer 2 15 C...

Page 17: ...adonly NSString version Discussion It is a string in the form of 1 0 0 and it is read only Availability SDK 0 6 0 and later 5 2 2 delegate Assign the object to apply BXPrinterControlDelegate method property readwrite id BXPrinterControlDelegate delegate Availability SDK 0 6 0 and later 5 2 3 target Control target printer object property readwrite BXPrinter target Discussion It is a control target ...

Page 18: ...set to 1 When it is set to a number bigger than 1 the printer search signal transmission is repeated by this number at intervals of 0 2 seconds Availability SDK 0 6 0 and later 5 2 6 alignment Horizontal alignment setting property readwrite int alignment Discussion Default value is set to left alignment and this setting affects all output printing including text and bar code Availability SDK 0 8 0...

Page 19: ...on Refer to 2 1 Character Set Default value is set to BXL_CS_437 Availability SDK 0 6 0 and later 5 2 10 internationalCharacterSet property readwrite char internationalCharacterSet Discussion Refer to 2 2 International Character Set Default value is set to BXL_CS_437 Availability SDK 0 6 0 and later 5 2 11 textEncoding Type of the text Encoding property readwrite long textEncoding Discussion Refer...

Page 20: ...ign int AutoConnection Discussion Refer to 2 11 Connection Control Availability SDK 2 0 2 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 con...

Page 21: ...d is called first time and the existing BXPrinterController class is returned from the next time Discussion Since BXPrinterController class uses only one instance in one process user should obtain and use it using this method instead of creating it Availability SDK 0 8 0 and later 5 3 2 open Initialization task for using BXPrinterController class memory allocation and background thread operation F...

Page 22: ...cted are searched Function prototype void lookup Discussion Stat 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 0 6 0 and later 5 3 5 selectTarget Initialization task for object ...

Page 23: ...bility SDK 2 0 2 and later 5 3 7 disconnect Disconnect to connected printer Function prototype void disconnect Discussion This method not works when AutoConnection is setting in BXL_CONNECTIONMODE_AUTO default 0 Availability SDK 2 0 2 and later 5 3 8 enableLSB Enable to Last status back Function prototype long enableLSB BOOL bEnable Parameters bEnable LSB Enable FALSE LSB Disable TRUE LSB Enable R...

Page 24: ...ld be set in advance Availability SDK 0 6 0 and later 5 3 10 printBox Print box shape 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 16 Resu...

Page 25: ...f lines to advance Return Value Refer to 2 16 Result Code Availability SDK 0 6 0 and later 5 3 12 nextPrintPos Feed the paper to the beginning of the next label paper Function prototype long nextPrintPos Return Value Refer to 2 16 Result Code Discussion This method works only when in label mode Availability SDK 0 6 0 and later ...

Page 26: ... Define bar code type height Height of bar code unit is number of dot range is 1 255 This setting does not affect 2 dimensional bar code width Width of barcode valid range is 2 7 Barcode printing may not work properly if the width of barcode print exceeds the printer paper width This setting does not affect 2 dimensional bar code alignment Barcode alignment setting Refer to 2 3 Barcode Text Alignm...

Page 27: ...1 Image print using ESC command Note What is Error Diffusion It is a method to present the color image or black and white image with less number of 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 Disadvantage is long processing type and this is because errors are measured a...

Page 28: ... 18 msrReadTrack Read MSR data It is MSR read mode If BXLMSR_DATAEMPTY is returned card is not read in MSR Scan the card with MSR again or use the msrReadCancel method to cancel the read mode Support Device Only Mobile printer POS Printer is not support Function prototype long msrReadTrack NSData data1 data2 NSData data2 data3 NSData data3 Parameters data1 Read MSR Data Track 1 and save it data2 R...

Page 29: ...ct is allocated inside the method The response is auto release one and users do not have to release it explicitly Availability SDK 0 9 0 and later 5 3 20 msrReadFullTrack Read entire MSR data It is MSR read mode If BXLMSR_DATAEMPTY is returned card is not read in MSR Scan the card with MSR again or use the msrReadCancel method to cancel the read mode Support Device Only Mobile printer POS Printer ...

Page 30: ...Support Device Only Mobile printer POS Printer is not support Function prototype long icON NSData response Parameters response ATR Answer to Reset value is returned Return Value Refer to 2 16 Result Code Discussion Response is saved as auto release type inside the method and users do not have to release it explicitly Availability SDK 0 6 0 and later 5 3 23 icOFF Turn off the power of the smart car...

Page 31: ...command data to send to printer ANSI CODE data response APDU response sent from printer is returned Return Value Refer to 2 16 Result Code Availability SDK 0 6 0 and later 5 3 25 icGetStatus Read the status of card inserted into the smart card reader of printer Support Device Only Mobile printer POS Printer is not support Function prototype long icGetStatus NSData response Parameters response Card...

Page 32: ...ist is provided Each address is saved in the form of NSNumber The images are provided in the form of autorelease and developers do not have to release it explicitly Return Value Refer to 2 16 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 ...

Page 33: ...setting level Color level and diffusion processing option of image 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 Note What is Error Diffusion It is a method to present the color image or black and white image with less number of bits pixel which may produce few visible patterns such as a snake like patte...

Page 34: ... When the width of the image is wider than the width of printer the image is resized automatically The width value is set to BXL_WIDTH_FULL and the image data processed with 1050 of level 50 of brightness and error diffusion algorithm enable settings is downloaded Availability SDK 1 0 0 and later 5 3 29 printNVImage Print the image data to the designated address in NV area다 Function prototype long...

Page 35: ... No action takes place if image does not exist in the corresponding address Availability SDK 1 0 0 and later 5 3 31 removeAllNVImages Delete all image data from the designated address in NV area Function prototype long removeAllNVImages Return Value Refer to 2 16 Result Code Availability SDK 1 0 0 and later 5 3 32 openDrawer Open to the Cash Drawer Function prototype long openDrawer Return Value R...

Page 36: ...n Value If the feature of the IC is supported return TRUE Availability SDK 3 0 0 and later 5 3 35 isSupport_Config Check whether a specific feature of the Config is supported Function prototype BOOL isSupport_Config Return Value If the feature of the config is supported return TRUE Availability SDK 3 0 0 and later 5 3 36 isSupport_CashDrawer Check whether a specific feature of the CashDrawer is su...

Page 37: ..._MSR Return Value If the feature of the LSB is supported return TRUE Availability SDK 3 0 0 and later 5 3 38 getBarcodeSupportTable Check that the barcode print function is supported Function prototype NSMutableArray getBarcodeSupportTable Return Value NSMutableArray that contains BXBarcode is returned Availability SDK 3 0 3 and later ...

Page 38: ...er It is called after printer connection is completed Function prototype void didStart Parameters controller BXPrinterController object that generates events Discussion It can be used to indicate the beginning of the use of printer class to users Availability SDK 0 6 0 and later 6 2 2 didStop It is called when class use is stopped using open method of BXPrinterController Function prototype void di...

Page 39: ... and late 6 2 4 didConnect This method is called when connection to printer finished Function prototype void didConnect BXPrinterController controller Discussion If you need to have more information about target printers please refer to target properties in BXLPrinterController Availability SDK 2 0 2 and later 6 2 5 didNotConnect This method is called when connection to printer cannot be made Func...

Page 40: ...pleted Function prototype void didLookupPrinters BXPrinterController controller Parameters controller BXPrinterController object that generates events Discussion It can be used to indicate the search status to users Availability SDK 0 6 0 and later 6 2 8 didNotLookup This method is called when printer search cannot be performed Function prototype void didNotLookup BXPrinterController controller wi...

Page 41: ...only when the connection is interrupted by external problem other than user intervention Refer to the target property of BXPrinterController for the information of target printer Availability SDK 0 6 0 and later 6 2 10 msrArrived This method is called when MSR data arrives correctly in MSR Read mode Function prototype void msrArrived BXPrinterController controller track NSNumber track Parameters c...

Page 42: ...lled when printer status variable has changed Function prototype void didUpdateStatus BXPrinterController controller Status NSNumber status Parameters controller BXPrinterController object that generates events status printer status Availability SDK 3 0 0 and later ...

Reviews: