2024年5月14日发(作者:越芷烟)
choose case aprinter
case "LQ150K " //EPSON-LQ150K
printsend(job, "~h1B~h43~003 ")
printsend(job, "~h1Bj~035 ")
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 = 35.955mm
printsend(job,
") //1 inch = 0.02541 =0.305/12 old :115
"~h1Bj~115
case 'LQ300K ' //EPSON-LQ300K
if invoice = '2 ' or invoice = '6 ' then //(invoice = '2
' 三联;invoice = '6 ' 二联)
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job, "~h1BU0 ") //双向打印 20020318 add
//(ESC 0 设定1/8inch换行量
printsend(job,
") //22 row per page, height at mm页长
"~h1BC~022
//(ESC C n 以行为单位设定页长
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 = 35.955mm
//(ESC J n 顺向走纸n/180 inch 0.141*115 = 16.215
printsend(job,
") //1 inch = 0.02541 =0.305/12 old :115
"~h1Bj~115
elseif invoice = '3 ' then //
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job, "~h1BU0 ") //双向打印 20020318 add
printsend(job,
") //96 row per page, height at mm页长
"~h1BC~096
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 = 35.955mm
else
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job, "~h1BU0 ") //双向打印 20020318 add
//(ESC 0 设定1/8inch换行量
printsend(job, "~h1B~h43~011
") //11 row per page, height at 139.5mm页长
If tdbz = '1 ' then //20010717
//(ESC C n 以行为单位设定页长
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 =
end if
//(ESC J n 顺向走纸n/180 inch 0.141*115 =
printsend(job,
") //1 inch = 0.02541 =0.305/12 old :115
end if
case "AR2400 "
printsend(job, "~h1B0 ") //1/8 inch per
printsend(job,
") //22 row per page, height at mm页长
16.215
"~h1Bj~115
row
"~h1BC~022
35.955mm
printsend(job, "~h1BU2 ") //双向打印 20020318 add
printsend(job, "~h1Bv~010 ") //退纸,一行,逆向走纸
printsend(job, "~h1Bv~010 ") //退纸,一行,逆向走纸
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bf ")
printsend(job, "~h1Bj~100 ")
行距,不产生回车,此处 n=100
case "AR3200
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//初始化,顺向走纸
//实行单次 n/180 逆向跳行,不影响当前
" printsend(job, "~h1B0
") //1/8 inch per row
printsend(job,
") //22 row per page, height at mm页长
"~h1BC~033
printsend(job, "~h1BU2 ") //双向打印 20020318 add
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bf ")
printsend(job, "~h1Bj~100 ")
行距,不产生回车,此处 n=100
case "LQ1600K "
printsend(job, "~h1B~h30 ")
printsend(job, "~h1BU0 ")
printsend(job,
") //28 row per page,
printsend(job, "~h1Bj~255 ")
printsend(job,
//退纸,一行,逆向走纸
//初始化,顺向走纸
//实行单次 n/180 逆向跳行,不影响当前
//1/8 inch per row
//双向打印 20020318 add
"~h1B~h43~040
height at mm页长
//退纸 0.141*255 = 35.955mm
"~h1Bj~115
") //1 inch = 0.02541 =0.305/12 old :115
case "LQ1900K ", "LQ1800K "
printsend(job, "~h1B~h30 ") //1/8 inch per row
printsend(job, "~h1BU0 ") //双向打印 20020318 add
printsend(job,
") //28 row per page, height at mm页长
"~h1B~h43~040
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 = 35.955mm
printsend(job,
") //1 inch = 0.02541 =0.305/12 old :115
"~h1Bj~115
case "LQ670K "
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job,
") //22 row per page, height at mm页长
"~h1BC~024
printsend(job, "~h1BU0 ") //双向打印 20020318 add
printsend(job, "~h1Bj~255 ") //实行单次 n/180 逆向跳行,不影响当前
行距,不产生回车,此处 n=100
printsend(job, "~h1Bj~255 ") //实行单次 n/180 逆向跳行,不影响当前
行距,不产生回车,此处 n=100
printsend(job, "~h1Bj~135 ") //实行单次 n/180 逆向跳行,不影响当前
行距,不产生回车,此处 n=100
case "KX-P1131 "
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job,
") //29 row per page, height at mm页长
"~h1BC~029
printsend(job, "~h1BU0 ") //双向打印
printsend(job, "~h1Bj~255 ") //实行单次 n/180 逆向跳行,不影响当前行距,
不产生回车,此处 n=255
printsend(job, "~h1Bj~200 ") //实行单次 n/180 逆向跳行,不影响当前行距,
不产生回车,此处 n=200
printsend(job, "~h1BJ~150 ") //实行单次 n/180 顺向走纸,不影响当前行距,
不产生回车,此处 n=150
case else
long ll_job
ll_job = printopen()
if ll_job = -1 then
messagebox( "提示 ", "打印机未准备好 ")
return
end if
//定制行距1/8英寸 1/8英寸 = 0.125 英寸 = 1.875 毫米
PrintSend(ll_job, CHAR(27)+CHAR(48))
//设定页长= 1/8 英寸 * 15 = 1.875 英寸
PrintSend(ll_job, CHAR(27)+CHAR(67)+CHAR(dw_nt()))
//因为 1 英寸 = 25.4 毫米 ,所以最终的纸长是:
//= 1.875 英寸 * 25.4 = 47.625 毫米
//必须使用printdatawindow,这样才能利用刚才设置的打印控制码
printdatawindow(ll_job,dw_print)
printclose(ll_job)
2024年5月14日发(作者:越芷烟)
choose case aprinter
case "LQ150K " //EPSON-LQ150K
printsend(job, "~h1B~h43~003 ")
printsend(job, "~h1Bj~035 ")
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 = 35.955mm
printsend(job,
") //1 inch = 0.02541 =0.305/12 old :115
"~h1Bj~115
case 'LQ300K ' //EPSON-LQ300K
if invoice = '2 ' or invoice = '6 ' then //(invoice = '2
' 三联;invoice = '6 ' 二联)
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job, "~h1BU0 ") //双向打印 20020318 add
//(ESC 0 设定1/8inch换行量
printsend(job,
") //22 row per page, height at mm页长
"~h1BC~022
//(ESC C n 以行为单位设定页长
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 = 35.955mm
//(ESC J n 顺向走纸n/180 inch 0.141*115 = 16.215
printsend(job,
") //1 inch = 0.02541 =0.305/12 old :115
"~h1Bj~115
elseif invoice = '3 ' then //
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job, "~h1BU0 ") //双向打印 20020318 add
printsend(job,
") //96 row per page, height at mm页长
"~h1BC~096
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 = 35.955mm
else
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job, "~h1BU0 ") //双向打印 20020318 add
//(ESC 0 设定1/8inch换行量
printsend(job, "~h1B~h43~011
") //11 row per page, height at 139.5mm页长
If tdbz = '1 ' then //20010717
//(ESC C n 以行为单位设定页长
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 =
end if
//(ESC J n 顺向走纸n/180 inch 0.141*115 =
printsend(job,
") //1 inch = 0.02541 =0.305/12 old :115
end if
case "AR2400 "
printsend(job, "~h1B0 ") //1/8 inch per
printsend(job,
") //22 row per page, height at mm页长
16.215
"~h1Bj~115
row
"~h1BC~022
35.955mm
printsend(job, "~h1BU2 ") //双向打印 20020318 add
printsend(job, "~h1Bv~010 ") //退纸,一行,逆向走纸
printsend(job, "~h1Bv~010 ") //退纸,一行,逆向走纸
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bf ")
printsend(job, "~h1Bj~100 ")
行距,不产生回车,此处 n=100
case "AR3200
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//退纸,一行,逆向走纸
//初始化,顺向走纸
//实行单次 n/180 逆向跳行,不影响当前
" printsend(job, "~h1B0
") //1/8 inch per row
printsend(job,
") //22 row per page, height at mm页长
"~h1BC~033
printsend(job, "~h1BU2 ") //双向打印 20020318 add
printsend(job, "~h1Bv~010 ")
printsend(job, "~h1Bf ")
printsend(job, "~h1Bj~100 ")
行距,不产生回车,此处 n=100
case "LQ1600K "
printsend(job, "~h1B~h30 ")
printsend(job, "~h1BU0 ")
printsend(job,
") //28 row per page,
printsend(job, "~h1Bj~255 ")
printsend(job,
//退纸,一行,逆向走纸
//初始化,顺向走纸
//实行单次 n/180 逆向跳行,不影响当前
//1/8 inch per row
//双向打印 20020318 add
"~h1B~h43~040
height at mm页长
//退纸 0.141*255 = 35.955mm
"~h1Bj~115
") //1 inch = 0.02541 =0.305/12 old :115
case "LQ1900K ", "LQ1800K "
printsend(job, "~h1B~h30 ") //1/8 inch per row
printsend(job, "~h1BU0 ") //双向打印 20020318 add
printsend(job,
") //28 row per page, height at mm页长
"~h1B~h43~040
printsend(job, "~h1Bj~255 ") //退纸 0.141*255 = 35.955mm
printsend(job,
") //1 inch = 0.02541 =0.305/12 old :115
"~h1Bj~115
case "LQ670K "
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job,
") //22 row per page, height at mm页长
"~h1BC~024
printsend(job, "~h1BU0 ") //双向打印 20020318 add
printsend(job, "~h1Bj~255 ") //实行单次 n/180 逆向跳行,不影响当前
行距,不产生回车,此处 n=100
printsend(job, "~h1Bj~255 ") //实行单次 n/180 逆向跳行,不影响当前
行距,不产生回车,此处 n=100
printsend(job, "~h1Bj~135 ") //实行单次 n/180 逆向跳行,不影响当前
行距,不产生回车,此处 n=100
case "KX-P1131 "
printsend(job, "~h1B0 ") //1/8 inch per row
printsend(job,
") //29 row per page, height at mm页长
"~h1BC~029
printsend(job, "~h1BU0 ") //双向打印
printsend(job, "~h1Bj~255 ") //实行单次 n/180 逆向跳行,不影响当前行距,
不产生回车,此处 n=255
printsend(job, "~h1Bj~200 ") //实行单次 n/180 逆向跳行,不影响当前行距,
不产生回车,此处 n=200
printsend(job, "~h1BJ~150 ") //实行单次 n/180 顺向走纸,不影响当前行距,
不产生回车,此处 n=150
case else
long ll_job
ll_job = printopen()
if ll_job = -1 then
messagebox( "提示 ", "打印机未准备好 ")
return
end if
//定制行距1/8英寸 1/8英寸 = 0.125 英寸 = 1.875 毫米
PrintSend(ll_job, CHAR(27)+CHAR(48))
//设定页长= 1/8 英寸 * 15 = 1.875 英寸
PrintSend(ll_job, CHAR(27)+CHAR(67)+CHAR(dw_nt()))
//因为 1 英寸 = 25.4 毫米 ,所以最终的纸长是:
//= 1.875 英寸 * 25.4 = 47.625 毫米
//必须使用printdatawindow,这样才能利用刚才设置的打印控制码
printdatawindow(ll_job,dw_print)
printclose(ll_job)