打印模块
模块名:Print_
函数列表
公共宏定义
#ifndef CHNFONT
#define CHNFONT "F:/chn.fon"
#endif
#ifndef PRNCACHE_16X16
#define PRNCACHE_16X16 "/prncache_16.txt"
#endif
#ifndef PRNCACHE_24X24
#define PRNCACHE_24X24 "/prncache_24.txt"
#endif
#ifndef CHNFONT_12
#define CHNFONT_12 "F:/cn12x12.dat"
#endif
#ifndef ENGFONT_5x8
#define ENGFONT_5x8 "F:/en5x8.dat"
#endif
#ifndef ENGFONT_8x14
#define ENGFONT_8x14 "/Asc8x14.pft"
#endif
#ifndef CHNFONT_24T
#define CHNFONT_24T "F:/HZK24T"
#endif
#ifndef CHNFONT_24S
#define CHNFONT_24S "F:/HZK24S"
#endif
#ifndef CHNFONT_GBK24
#define CHNFONT_GBK24 "F:/#gbk24.fon"
#endif
#ifndef ASCFONT_24
#define ASCFONT_24 "F:/ASC24"
#endif
#ifndef ASCFONT_16
#define ASCFONT_16 "F:/ASC16"
#endif
//define print attribution
#define NORMAL 0
#define DH 1
#define DW 2
#define INV 4
/*按格式打印*/
typedef enum
{
FORMAT_PRINT=0, /* TOTAL: 123456.99?*/
FORMAT_BOLD, /* TOTAL:123456.99\n ?*/
FORMAT_LBOLD, /* *C*A*S*H*I*E*R 003?where *X*X*X - BOLD font */
FORMAT_RBOLD /* Cashier *0*0*3?where *X*X*X - BOLD font */
} TFormat;
/*打印返回*/
typedef enum
{
PRINT_OK = 0, /*打印机正常*/
PRINT_FAIL = -1, /*打印机故障*/
PRINT_NOPAPER = -2, /*打印机缺纸*/
PRINT_NOHANDLE = -3, /*未获取打印机句柄*/
PRINT_OPENFAIL = -4, /*open打印文件失败*/
PRINT_READFAIL = -5, /*读数据失败*/
PRINT_WRITEFAIL = -6, /*写数据失败*/
PRINT_MERCHFAIL = -7, /*打印机硬件故障*/
}enumPrintRet;
typedef enum
{
FORWARD_PAPER=1,
REVERSE_PAPER,
} PaperFeed;
typedef enum
{
MODE_180_DOTS = 0,
MODE_360_DOTS = 1,
} DotModeType;
typedef enum
{
PRINT_FONT16 = 16,
PRINT_FONT24 = 24,
} PRINTFONTSIZE;
#define PRN_MAX_FONT_NUM 1000
#define PRN_MAX_LIMI_NUM 200