官网demo下载地址:
http://www.argox.com.cn/servicedev/5/c
页面中嵌入activeX控件:
<object id="ArgoxPrinter" classid="clsid:D7617E8A-D164-419D-BBC6-D8F8CC46FA5A"></object>
<input type="button" value="开始打印" style=" 95px" onclick="Print()" />
<script type="text/javascript"> function Print() { //标签打印机说明 //该打印机型号为:orgox OS-214 plus 分辨率:203dpi 打印宽度:104mm 打印速度:51-76mm/s //所使用纸带:宽60mm 高 40mm //所以计算坐标的时候: //X,Y坐标的单位为点 dot 1 dot=0.125mm 60/0.125=480dot(最宽设置的点) 最高320点 //字体尺寸和高度单位 dot. FSize = (dpi*point)/72 ArgoxPrinter.A_OpenUSBPort(); //ArgoxPrinter.A_Draw_Box_A("A", 10, 10, 390, 140, 3, 3); //ArgoxPrinter.A_Draw_Line_A("A", 220, 10, 3, 140); //ArgoxPrinter.A_Bar2d_QR(235, 100, 1, "3", 10, "N", 0, "1234567"); //ArgoxPrinter.A_Prn_Barcode_1D(20, 60, 1, "E", 0, 0, 20, "N", 0, "Brsn-abcd-001"); //标签纸吐出一小段标签,便于撕裂标签,下一张打印时会退回到适当点 ArgoxPrinter.A_Set_Backfeed_A(320); //X,Y的坐标是从标签纸的左下角开始定位0,0 ArgoxPrinter.A_Prn_Barcode_1D(45, 80, 1, "E", 0, 0, 20, "N", 0, "B16121745230"); ArgoxPrinter.A_Prn_Text_TrueType_A(20, 70, 20, "宋体", 1, 600, 0, 0, 0, "AA", "客户:北京京东世纪有限公司", 1); ArgoxPrinter.A_Prn_Text_TrueType_A(20, 60, 20, "宋体", 1, 600, 0, 0, 0, "BB", "产品编号:1000124", 1); ArgoxPrinter.A_Prn_Text_TrueType_A(20, 50, 20, "宋体", 1, 600, 0, 0, 0, "CC", "颜色:R80 序列号:16121745230", 1); ArgoxPrinter.A_Prn_Text_TrueType_A(20, 40, 20, "宋体", 1, 600, 0, 0, 0, "DD", "克重:120 数量:10", 1); ArgoxPrinter.A_Prn_Text_TrueType_A(20, 30, 20, "宋体", 1, 600, 0, 0, 0, "EE", "幅宽:90 完工时间:2016/12/18 22:12", 1); ArgoxPrinter.A_Print_Out(1, 1); ArgoxPrinter.A_CloseUSBPort(); } </script>
参考地址:
http://lydawen.iteye.com/blog/1894684
http://blog.csdn.net/yuliyige/article/details/48437225
网页ActiveX控件注意的地方:
http://www.argox.com.cn/serviceqa/70