曾清 发表于 2020-2-17 14:48:57

打印机 Android SDK 使用说明1

打印机 Android SDK 使用说明


-------2018.4.17
打印机 Android SDK 使用说明.............................................................................................................................. 1
一:说明....................................................................................................................................................... 4
二:常量和函数............................................................................................................................................ 4
1.    常量定义......................................................................................................................................... 5
2.    公用接口......................................................................................................................................... 8
1).SDK_Version........................................................................................................................... 8
2).Prn_GetPortList................................................................................................................... 8
3).Prn_Connect........................................................................................................................... 9
4).Prn_Disconnect................................................................................................................... 11
3.热敏打印机接口................................................................................................................................ 12
1).Prn_PrinterInit................................................................................................................. 12
2).Prn_Status........................................................................................................................... 12
3).Prn_PowerStatus................................................................................................................. 13
4).int Prn_PrintText............................................................................................................. 13
5).Prn_PrintEscText............................................................................................................... 15
6).Prn_PrintString................................................................................................................. 16
7).Prn_PrintBarcode............................................................................................................... 16
8).Prn_PrintQRCode................................................................................................................. 18
9).Prn_PrintBitmap................................................................................................................. 18
10).Prn_PrintBmp..................................................................................................................... 19
11).Prn_CutPaper..................................................................................................................... 20
12).Prn_CutPaper..................................................................................................................... 21
13).Prn_OpenCashbox............................................................................................................... 21
14).Prn_LineFeed..................................................................................................................... 22
15).Prn_MarkFeed..................................................................................................................... 23
16).Prn_SetCharacterSet....................................................................................................... 23
17).Prn_SetInterCharacterSet............................................................................................. 24
18).Prn_SetLineSpacing......................................................................................................... 25
19).Prn_SetFontStyle............................................................................................................. 25
20).Prn_SetFontSize............................................................................................................... 26
21).Prn_SetAlignment............................................................................................................. 27
22).Prn_SendData..................................................................................................................... 28
23).Prn_ReadData..................................................................................................................... 28
24).Prn_BeginTransaction..................................................................................................... 29
25).Prn_EndTransaction......................................................................................................... 29
26).Prn_GetMsrTrack............................................................................................................... 30


file:///C:/Users/ADMINI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif


4.标签打印机接口................................................................................................................................ 32
1).prn_PageSetup..................................................................................................................... 32
2).prn_PagePrint..................................................................................................................... 32
3).prn_PageClear..................................................................................................................... 33
4).prn_PrinterStop................................................................................................................. 33
5).prn_DrawBox......................................................................................................................... 33
6).prn_DrawLine....................................................................................................................... 34
7).prn_DrawInverseLine......................................................................................................... 34
8).prn_DrawText....................................................................................................................... 35
9).prn_DrawTextAlign............................................................................................................. 37
10).prn_DrawBarcode............................................................................................................... 38
11).prn_BarcodeText............................................................................................................... 40
12).prn_PrintBitmap............................................................................................................... 40
13).prn_PrinterStatus........................................................................................................... 41
14).prn_AddLabelCommand....................................................................................................... 41
15).prn_DrawWatermark........................................................................................................... 42
5.条码打印机接口................................................................................................................................ 43
1).bar_SetSize......................................................................................................................... 43
2).bar_SetGap........................................................................................................................... 43
3).bar_SetBline....................................................................................................................... 45
4).bar_SetOffset..................................................................................................................... 45
5).bar_SetShift....................................................................................................................... 46
6).bar_SetSpeed....................................................................................................................... 46
7).bar_SetDensity................................................................................................................... 47
8).bar_SetDirection............................................................................................................... 47
9).bar_SetPeel......................................................................................................................... 48
10).bar_SetCharacterSet....................................................................................................... 49
11).bar_CLS............................................................................................................................... 50
12).bar_Print........................................................................................................................... 50
12).bar_DrawBar....................................................................................................................... 50
13).bar_Barcode....................................................................................................................... 51
14).bar_QRCode......................................................................................................................... 52
15).bar_Bitmap......................................................................................................................... 53
16).bar_DrawBox....................................................................................................................... 54
17).bar_PutPCX......................................................................................................................... 54
18).bar_SetReverse................................................................................................................. 55
19).bar_Text............................................................................................................................. 56
20).bar_DownloadBAS............................................................................................................... 57
21).bar_DownloadFile............................................................................................................. 57
22).bar_KillFile..................................................................................................................... 58
23).bar_RunFile....................................................................................................................... 58
24).bar_SetCounter................................................................................................................. 59
25).bar_PrintCounter............................................................................................................. 59
三:例程..................................................................................................................................................... 60
四:其他问题.............................................................................................................................................. 61
1.访问相关端口的权限问题............................................................................................................... 61
2.批处理模式.................................................................................................................................... 62
3.打印语言问题................................................................................................................................ 63



页: [1]
查看完整版本: 打印机 Android SDK 使用说明1