打印模块

模块名:Print_

函数列表

函数名 用途
Print_Init 初始化打印机
Print_Open 打开打印机
Print_Close 关闭打印机
Print_DelCache 删除打印临时文件
Print_PreLoadFont 下载16x16点阵字库
Print_Str 打印任意中英文字串的函数
Print_StrLR 以左对齐,右对齐方式打印
Print_StrStr 左右对齐打印字符串
Print_English 打印英文字符串
Print_EngSmall 打印英文字符串(小字体)
Print_Hex 打印16进制数据.
Print_Str_12 以图形方式打印任意中(12x12)英文(5x8)字串的函数
Print_FormFeed 针式打印机换页指令
Print_Feed 针式打印机进纸/退纸指令
Print_logo 打印LOGO
Print_bitmap 打印BMP
Print_Pixel 打印点阵
Print_SetLineHeight 设置行高度
Print_SetFormLength 设置针打纸页面长度
Print_SetUIScheme 设置打印机检测状态后是否显示提示信息
Print_SetDark 设置打印黑度
Print_SetSprocketDotMode 设置针打点阵
Print_SetFontSize 设置打印字体
Print_SetFullHzMode 设置ASCII(英文)打印是否当作汉字点阵模式打印
Print_QRCode 打印二维码

公共宏定义

#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

results matching ""

    No results matching ""