ZSDK_API
1.4.957
|
Defines functions used for interacting with printer formats. More...
#import <FormatUtil.h>
Instance Methods | |
(NSData *) | - retrieveFormatFromPrinterWithPath:error: |
Retrieves a format from the printer. | |
(NSArray *) | - getVariableFieldsWithFormatContents:error: |
Returns a list of descriptors of the variable fields in this format. | |
(BOOL) | - printStoredFormat:withFormatData:error: |
Prints a stored format on the printer, filling in the fields specified by the array. | |
(BOOL) | - printStoredFormat:withFormatData:andWithEncoding:error: |
Prints a stored format on the printer, filling in the fields specified by the array. | |
(BOOL) | - printStoredFormat:withDictionary:error: |
Prints a stored format on the printer, filling in the fields specified by the NSDictionary. | |
(BOOL) | - printStoredFormat:withDictionary:andWithEncoding:error: |
Prints a stored format on the printer, filling in the fields specified by the NSDictionary. | |
Defines functions used for interacting with printer formats.
Print a stored format with the given variables. This ZPL will store a format on a printer, for use with the example code.
- (NSArray*) getVariableFieldsWithFormatContents: | (NSString *) | formatContents | |
error: | (NSError **) | error | |
Returns a list of descriptors of the variable fields in this format.
formatContents | The contents of the recalled format. |
error | Will be set to the error that occured. |
- (BOOL) printStoredFormat: | (NSString *) | formatPathOnPrinter | |
withDictionary: | (NSMutableDictionary *) | vars | |
andWithEncoding: | (NSStringEncoding) | encoding | |
error: | (NSError **) | error | |
Prints a stored format on the printer, filling in the fields specified by the NSDictionary.
The values of any format variables will be encoded using the provided encoding
type. e.g. NSUTF8StringEncoding. See NSStringEncoding for more information about encoding types.
formatPathOnPrinter | The location of the file on the printer (e.g. "E:FORMAT.ZPL"). |
vars | An NSDictionary which contains the key/value pairs for the stored format. For ZPL formats, the key number should correspond directly to the number of the field in the format. For CPCL formats, the values will be passed in ascending numerical order. |
encoding | A character-encoding name (e.g. NSUTF8StringEncoding). |
error | Will be set to the error that occured. |
NO
if there was an error printing the format. - (BOOL) printStoredFormat: | (NSString *) | formatPathOnPrinter | |
withDictionary: | (NSMutableDictionary *) | vars | |
error: | (NSError **) | error | |
Prints a stored format on the printer, filling in the fields specified by the NSDictionary.
The values of any format variables will be encoded using the default encoding
type. See NSStringEncoding for more information about encoding types.
formatPathOnPrinter | The location of the file on the printer (e.g. "E:FORMAT.ZPL"). |
vars | An NSDictionary which contains the key/value pairs for the stored format. For ZPL formats, the key number should correspond directly to the number of the field in the format. For CPCL formats, the values will be passed in ascending numerical order. |
error | Will be set to the error that occured. |
NO
if there was an error printing the format. - (BOOL) printStoredFormat: | (NSString *) | formatPathOnPrinter | |
withFormatData: | (NSArray *) | vars | |
andWithEncoding: | (NSStringEncoding) | encoding | |
error: | (NSError **) | error | |
Prints a stored format on the printer, filling in the fields specified by the array.
The values of any format variables will be encoded using the provided encoding
type. e.g. NSUTF8StringEncoding. See NSStringEncoding for more information about encoding types.
formatPathOnPrinter | The location of the file on the printer (e.g. "E:FORMAT.ZPL"). |
vars | An array of strings representing the data to fill into the format. For ZPL formats, index 0 of the array corresponds to field number 2 (^FN2). For CPCL, the variables are passed in the order that they are found in the format. |
encoding | A character-encoding name (e.g. NSUTF8StringEncoding). |
error | Will be set to the error that occured. |
NO
if there was an error printing the format. - (BOOL) printStoredFormat: | (NSString *) | formatPathOnPrinter | |
withFormatData: | (NSArray *) | vars | |
error: | (NSError **) | error | |
Prints a stored format on the printer, filling in the fields specified by the array.
The values of any format variables will be encoded using the default encoding
type. See NSStringEncoding for more information about encoding types.
formatPathOnPrinter | The name of the format on the printer, including the extension (e.g. "E:FORMAT.ZPL"). |
vars | An array of strings representing the data to fill into the format. For ZPL formats, index 0 of the array corresponds to field number 2 (^FN2). For CPCL, the variables are passed in the order that they are found in the format. |
error | Will be set to the error that occured. |
NO
if there was an error printing the format. - (NSData*) retrieveFormatFromPrinterWithPath: | (NSString *) | formatPathOnPrinter | |
error: | (NSError **) | error | |
Retrieves a format from the printer.
On a ZPL printer, only .ZPL
files are supported. On a CPCL printer, only .FMT
and .LBL
files are supported.
formatPathOnPrinter | The location of the file on the printer (e.g. "E:FORMAT.ZPL"). |
error | Will be set to the error that occured. |