CustomiOSApi 1.11
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- (void) SetPageWidth:(NSInteger)iNewPageWidth :(NSError**)error;
55- (NSInteger) GetResolution;
56
57- (NSInteger) GetReadTimeout:(NSError**)error;
58- (void) SetReadTimeout:(NSInteger)msecs :(NSError**)error;
59- (NSInteger) GetWriteTimeout:(NSError**)error;
60- (void) SetWriteTimeout:(NSInteger)msecs :(NSError**)error;
61
62- (void) ClearReadBuffer:(NSError**)error;
63- (NSData *) ReadData:(NSError**)error;
64- (void) WriteData:(NSData *)data :(NSError**)error;
65- (NSData *) WriteDataForResponse:(NSData *)data :(NSInteger)readSize :(NSError**)error;
66
67- (void) Feed:(NSInteger)nFeeds :(NSError**)error;
68- (void) Cut:(enum CutType)cutType :(NSError**)error;
69- (void) Eject:(enum EjectType)ejectType :(NSError**)error;
70- (void) Present:(NSInteger)presentMM :(NSError**)error;
71- (void) Align:(enum AlignType)alignType :(NSError**)error;
72- (void) OpenCashDrawer:(enum DrawerType)drawerType :(NSInteger)dwTimeOn :(NSInteger)dwTimeOff :(NSError**)error;
73
74- (void) PrintText:(NSString*)text :(NSInteger)pixel_la :(NSInteger)pixel_w :(PrinterFont*)font :(NSError**)error;
75- (void) PrintTextLF:(NSString*)text :(NSInteger)pixel_la :(NSInteger)pixel_w :(PrinterFont*)font :(NSError**)error;
76- (void) PrintText:(NSString*)text :(PrinterFont*)font :(NSError**)error;
77- (void) PrintTextLF:(NSString*)text :(PrinterFont*)font :(NSError**)error;
78- (void) PrintTextArrayLF:(NSArray*)textarray :(PrinterFont*)font :(NSError**)error;
79- (void) PrintText:(NSString*)text :(NSError**)error;
80- (void) PrintTextLF:(NSString*)text :(NSError**)error;
81- (void) PrintTextArrayLF:(NSArray*)textarray :(NSError**)error;
82
83- (void) PrintImage:(UIImage*)image :(NSInteger)leftAlign :(enum ImageScale)widthOption :(NSInteger)imgWidth :(NSError**)error;
84- (void) PrintImage:(UIImage*)image :(NSError**)error;
85
86- (void) PrintBarcodeText:(NSString*)brcText :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
87
88- (void) PrintBarcodeData:(NSData*)brcData :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
89
90@end
91
92
This the container class to hold the printer status
Definition: CustomPrinterStatus.h:18
Class definition for CUSTOM printers. Defines functionality to print text/image, read/write data to p...
Definition: CustomPrinter.h:21
This the container class to hold various font attributes
Definition: PrinterFont.h:18