|
@@ -60,7 +60,16 @@ export const textFormat = function(command,text,maxFontNums,left,top,lightHeight
|
|
|
}
|
|
|
return rowTop
|
|
|
}
|
|
|
-
|
|
|
+export const printText = function(tsc,text){
|
|
|
+ const command = tsc.jpPrinter.createNew()
|
|
|
+ command.init()
|
|
|
+ command.setSize(40, 30) // 标签纸张宽高,单位mm
|
|
|
+ command.setGap(3) // 标签上下间距,单位mm
|
|
|
+ command.setCls() // 清除缓冲区数据
|
|
|
+ command.setText(100, 48, "5", 4, 3, text)
|
|
|
+ command.setPagePrint(1,1) // 打印分数1,每个标签重发打印2次
|
|
|
+ return command
|
|
|
+}
|
|
|
// 60 * 40 尺寸模板
|
|
|
export const printTempl = function(tsc,data){
|
|
|
let top = 24 // 距离顶部10点像素
|