Zebra API for iOS (Build v1.6.1158)
Loading...
Searching...
No Matches
<ZebraPrinter> Protocol Reference

@abstract An interface used to obtain various properties of a Zebra printer. More...

#include <ZebraPrinter.h>

Public Types

enum  PrinterLanguage { PRINTER_LANGUAGE_ZPL , PRINTER_LANGUAGE_CPCL }
 Enumeration of the various printer control languages supported by Zebra printers. More...
 

Instance Methods

(PrinterLanguage) - getPrinterControlLanguage
 Returns the printer control language (ZPL or CPCL) of the printer.
 
(id< FormatUtil, NSObject >) - getFormatUtil
 Returns an instance of a FormatUtil object which contains convenience methods to interact with formats on a Zebra printer.
 
(id< FileUtil, NSObject >) - getFileUtil
 Returns an instance of a FileUtil object which contains convenience methods to interact with files on a Zebra printer.
 
(id< GraphicsUtil, NSObject >) - getGraphicsUtil
 Returns an instance of a GraphicsUtil object which contains convenience methods to print images to a Zebra printer.
 
(PrinterStatus *) - getCurrentStatus:
 Returns a new instance of PrinterStatus that can be used to determine the status of a printer.
 
(id< MagCardReader, NSObject >) - getMagCardReader
 Returns an instance of a MagCardReader object which contains convenience methods for accessing the printer's magnetic card reader.
 
(id< SmartCardReader, NSObject >) - getSmartCardReader
 Returns an instance of a SmartCardReader object which contains convenience methods for accessing the printer's smart card reader.
 
(id< ToolsUtil, NSObject >) - getToolsUtil
 Returns an instance of a ToolsUtil object which contains convenience methods to perform printer actions.
 

Detailed Description

@abstract An interface used to obtain various properties of a Zebra printer.

How to create an instance of a ZebraPrinter.

#import <UIKit/UIKit.h>
#import "TcpPrinterConnection.h"
#import "ZebraPrinter.h"
#import "ZebraPrinterFactory.h"
TcpPrinterConnection *zebraPrinterConnection = [[TcpPrinterConnection alloc] initWithAddress:@"192.168.1.100" andWithPort:6101];
BOOL success = [zebraPrinterConnection open];
NSError *error = nil;
id<ZebraPrinter,NSObject> printer = [ZebraPrinterFactory getInstance:zebraPrinterConnection error:&error];
NSString *printerLanguageMessage = [[NSString alloc] initWithFormat:@"Printer Control Language is %@", pcLanguage];
[zebraPrinterConnection close];
if (error != nil || printer == nil || success == NO) {
UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[errorAlert show];
[errorAlert release];
}
[printerLanguageMessage release];
[zebraPrinterConnection release];
Establishes a TCP connection to a printer.
Definition TcpPrinterConnection.h:112
A factory used to acquire an instance of a ZebraPrinter.
Definition ZebraPrinterFactory.h:19
PrinterLanguage
Enumeration of the various printer control languages supported by Zebra printers.
Definition ZebraPrinter.h:55
PrinterLanguage getPrinterControlLanguage()
Returns the printer control language (ZPL or CPCL) of the printer.

Member Enumeration Documentation

◆ PrinterLanguage

- (enum) PrinterLanguage

Enumeration of the various printer control languages supported by Zebra printers.

Enumerator
PRINTER_LANGUAGE_ZPL 

Printer control language ZPL.

PRINTER_LANGUAGE_CPCL 

Printer control language CPCL.

Method Documentation

◆ getCurrentStatus:

- (PrinterStatus *) getCurrentStatus: (NSError **) error

Returns a new instance of PrinterStatus that can be used to determine the status of a printer.

Each invocation of this method will result in a query of the connected printer. If more than one status value is to be read, it is recommended that a copy of PrinterStatus is stored locally.

Note: This method must be invoked again to retrieve the most up-to-date status of the printer. The PrinterStatus object will only query the printer upon creation.

Parameters
errorWill be set to the error that occured.
Returns
A new instance of PrinterStatus.
See also
PrinterStatus

◆ getFileUtil

- (id< FileUtil, NSObject >) getFileUtil

Returns an instance of a FileUtil object which contains convenience methods to interact with files on a Zebra printer.

Returns
Instance of a FileUtil object that provides methods to interact with files on a Zebra printer.
See also
FileUtil

◆ getFormatUtil

- (id< FormatUtil, NSObject >) getFormatUtil

Returns an instance of a FormatUtil object which contains convenience methods to interact with formats on a Zebra printer.

Returns
Instance of a FormatUtil object that provides methods to interact with formats on a Zebra printer.
See also
FormatUtil

◆ getGraphicsUtil

- (id< GraphicsUtil, NSObject >) getGraphicsUtil

Returns an instance of a GraphicsUtil object which contains convenience methods to print images to a Zebra printer.

Returns
Instance of a GraphicsUtil object that provides methods to print images to a Zebra printer.
See also
GraphicsUtil

◆ getMagCardReader

- (id< MagCardReader, NSObject >) getMagCardReader

Returns an instance of a MagCardReader object which contains convenience methods for accessing the printer's magnetic card reader.

Returns
A new instance of MagCardReader.
See also
MagCardReader

◆ getPrinterControlLanguage

- (PrinterLanguage) getPrinterControlLanguage

Returns the printer control language (ZPL or CPCL) of the printer.

Returns
The printer control language.
See also
PrinterLanguage

◆ getSmartCardReader

- (id< SmartCardReader, NSObject >) getSmartCardReader

Returns an instance of a SmartCardReader object which contains convenience methods for accessing the printer's smart card reader.

Returns
A new instance of SmartCardReader.
See also
SmartCardReader

◆ getToolsUtil

- (id< ToolsUtil, NSObject >) getToolsUtil

Returns an instance of a ToolsUtil object which contains convenience methods to perform printer actions.

(Restore defaults, calibrate, etc.).

Returns
Instance of a ToolsUtil object that provides methods to perform printer actions. (Restore defaults, calibrate, etc).
See also
ToolsUtil

The documentation for this protocol was generated from the following file: