ZSDK_API
1.5.1049
|
A factory used to acquire an instance of a ZebraPrinter. More...
#import <ZebraPrinterFactory.h>
Class Methods | |
(id< ZebraPrinter, NSObject >) | + getInstance:error: |
Factory method to create the correct ZebraPrinter concrete class based on the printer's control language. | |
(id< ZebraPrinter, NSObject >) | + getInstance:withCpclPrefixes:error: |
Factory method to create the correct ZebraPrinter concrete class given a user supplied list of known CPCL prefixes. | |
(id< ZebraPrinter, NSObject >) | + getInstance:withPrinterLanguage: |
Factory method to create the correct ZebraPrinter concrete class based on the provided printer control language. | |
A factory used to acquire an instance of a ZebraPrinter.
+ (id<ZebraPrinter,NSObject>) getInstance: | (id< ZebraPrinterConnection, NSObject >) | connection | |
error: | (NSError **) | error | |
Factory method to create the correct ZebraPrinter concrete class based on the printer's control language.
If the SGD value, appl.name
, starts with one of the following, the printer is determined to be a CPCL printer. Otherwise it is considered to be a ZPL printer
If you wish to use prefixes other than the ones listed above, use getInstance:withCpclPrefixes:error:
Note : iMZ printers are configured by default to be in "Line Print" mode. This method will put the printer ZPL mode so that the operations on a ZebraPrinter object will work. To put the printer back in Line Print mode, set the SGD "device.languages" to "line_print" (! U1 setvar "device.languages" "line_print")
connection | An open connection to a printer. |
error | Will be set to the error that occured. error.code will be ZEBRA_ERROR_NO_CONNECTION if the connection was not open. error.code will be ZEBRA_UNKNOWN_PRINTER_LANGUAGE if the appl.name SGD value could not be obtained from the printer. |
+ (id<ZebraPrinter,NSObject>) getInstance: | (id< ZebraPrinterConnection, NSObject >) | connection | |
withCpclPrefixes: | (NSArray *) | cpclPrefixes | |
error: | (NSError **) | error | |
Factory method to create the correct ZebraPrinter concrete class given a user supplied list of known CPCL prefixes.
If the SGD value, appl.name
, starts with one of the cpclPrefixes, the printer is determined to be a CPCL printer. Otherwise it is considered to be a ZPL printer
Note : iMZ printers are configured by default to be in "Line Print" mode. This method will put the printer ZPL mode so that the operations on a ZebraPrinter object will work. To put the printer back in Line Print mode, set the SGD "device.languages" to "line_print" (! U1 setvar "device.languages" "line_print")
connection | An open connection to a printer. |
cpclPrefixes | An array of possible CPCL version number prefixes. |
error | Will be set to the error that occured. error.code will be ZEBRA_ERROR_NO_CONNECTION if the connection was not open. error.code will be ZEBRA_UNKNOWN_PRINTER_LANGUAGE if the appl.name SGD value could not be obtained from the printer. |
+ (id<ZebraPrinter,NSObject>) getInstance: | (id< ZebraPrinterConnection, NSObject >) | connection | |
withPrinterLanguage: | (PrinterLanguage) | language | |
Factory method to create the correct ZebraPrinter concrete class based on the provided printer control language.
connection | An open connection to a printer. |
language | The language of the printer instance to be created. |