| CustomiOSApi 1.09

CustomPrinterBase.h
1//
2// CustomPrinterBase.h
3// CustomiOSApi
4//
5// Created by CUSTOM on 08/07/13.
6// Copyright (c) 2013 CUSTOM. All rights reserved.
7//
8
9#import "CustomPrinter.h"
10#import "CommPort.h"
11#import "PrinterFont.h"
12#import "Graphics.h"
13#import "PrinterFeatures.h"
14
15//Hide it in the documentation
16// @cond PRIVATE
17@interface CustomPrinterBase : CustomPrinter
18{
19 @public
20 NSString* PRINTER_NAME;
21 NSInteger PAPER_WIDTH;
22 NSInteger PRINTER_RESOLUTION;
23 Boolean PRINT_ADD_PAGE_WIDTH;
24 Boolean GETFEATURES_AVAILABLE;
25 enum Compression PRINTER_COMPRESSIONTYPE;
26 NSData* TAB_CODEPAGE_TYPE;
27 NSData* TAB_CODEPAGE_CMD;
28 PrinterFeatures* printerFeatures;
29
30 @protected
31 CommPort* commPort;
32 PrinterFont* currentFont;
33
34 @private
35
36}
37
38-(id)initWithComm:(CommPort*)cPort;
39
40//***********************************************
41// COMMON FUNCTIONS
42//***********************************************
43- (void) Close:(NSError**)error;
44- (enum CommPortType) GetPortType;
45- (void) InitPrinterFeatures;
46- (Boolean) IsPrinterOnline:(NSError**)error;
47- (NSInteger) GetPrinterId:(NSError**)error;
48- (NSString*) GetFirmwareVersion:(NSError**)error;
49- (NSString*) GetAPIVersion;
50- (NSData*) GetPrinterFullStatusBuffer:(NSError**)error;
51- (CustomPrinterStatus*) GetPrinterFullStatus:(NSError**)error;
52- (NSString*) GetPrinterName;
53- (NSInteger) GetPageWidth;
54
55- (NSInteger) GetReadTimeout:(NSError**)error;
56- (void) SetReadTimeout:(NSInteger)msecs :(NSError**)error;
57- (NSInteger) GetWriteTimeout:(NSError**)error;
58- (void) SetWriteTimeout:(NSInteger)msecs :(NSError**)error;
59
60- (void) ClearReadBuffer:(NSError**)error;
61- (NSData *) ReadData:(NSError**)error;
62- (void) WriteData:(NSData *)data :(NSError**)error;
63- (NSData *) WriteDataForResponse:(NSData *)data :(NSInteger)readSize :(NSError**)error;
64
65- (void) Feed:(NSInteger)nFeeds :(NSError**)error;
66- (void) Cut:(enum CutType)cutType :(NSError**)error;
67- (void) Eject:(enum EjectType)ejectType :(NSError**)error;
68- (void) Present:(NSInteger)presentMM :(NSError**)error;
69
70- (void) PrintText:(NSString*)text :(NSInteger)pixel_la :(NSInteger)pixel_w :(PrinterFont*)font :(NSError**)error;
71- (void) PrintTextLF:(NSString*)text :(NSInteger)pixel_la :(NSInteger)pixel_w :(PrinterFont*)font :(NSError**)error;
72- (void) PrintText:(NSString*)text :(PrinterFont*)font :(NSError**)error;
73- (void) PrintTextLF:(NSString*)text :(PrinterFont*)font :(NSError**)error;
74- (void) PrintTextArrayLF:(NSArray*)textarray :(PrinterFont*)font :(NSError**)error;
75- (void) PrintText:(NSString*)text :(NSError**)error;
76- (void) PrintTextLF:(NSString*)text :(NSError**)error;
77- (void) PrintTextArrayLF:(NSArray*)textarray :(NSError**)error;
78
79
80- (void) PrintImage:(UIImage*)image :(NSInteger)leftAlign :(enum ImageScale)widthOption :(NSInteger)imgWidth :(NSError**)error;
81- (void) PrintImage:(UIImage*)image :(NSError**)error;
82
83- (void) PrintBarcodeText:(NSString*)brcText :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
84
85- (void) PrintBarcodeData:(NSData*)brcData :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
86
87@end
88
89
CustomPrinterStatus
This the container class to hold the printer status
Definition: CustomPrinterStatus.h:18
CustomPrinter
Class definition for CUSTOM printers. Defines functionality to print text/image, read/write data to p...
Definition: CustomPrinter.h:21
PrinterFont
This the container class to hold various font attributes
Definition: PrinterFont.h:18