ZSDK_API  1.5.1049
 All Classes Functions Enumerations Enumerator Properties Pages
<ZebraPrinter> Protocol Referenceabstract

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

#import <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

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];

Member Enumeration Documentation

- (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

- (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
- (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
- (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
- (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
- (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
- (PrinterLanguage) getPrinterControlLanguage

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

Returns
The printer control language.
See Also
PrinterLanguage
- (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
- (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: