小弟首次学习的JAVA调用TSC打印barcode,但老是出现错误,我把打印机改成本地的是没有问题的,但是一改成共享打印机就报错。求解决!。
var TSCObj;
TSCObj = new ActiveXObject("TSCActiveX.TSCLIB");
//TSCObj.ActiveXabout();
TSCObj.ActiveXopenport("\\192.168.1.48\TSC_TTP-244_Plus");
TSCObj.ActiveXdownloadpcx("D://UL.PCX", "UL.PCX");
TSCObj.ActiveXsetup("101.6", "63.5", "5", "8", "0", "2", "0");
//TSCObj.ActiveXformfeed();
//TSCObj.ActiveXnobackfeed();
TSCObj.ActiveXsendcommand("SET TEAR ON");
TSCObj.ActiveXclearbuffer();
TSCObj.ActiveXprinterfont("10", "10", "3", "0", "1", "1",
"ActiveXdll Test!!");
TSCObj.ActiveXsendcommand("PUTPCX 10,200,\"UL.PCX\"");
TSCObj.ActiveXwindowsfont(400, 200, 48, 0, 3, 1, "arial", "DEG 0");
TSCObj.ActiveXwindowsfont(400, 200, 48, 90, 3, 1, "arial", "DEG 90");
TSCObj.ActiveXwindowsfont(400, 200, 48, 180, 3, 1, "arial", "DEG 180");
TSCObj.ActiveXwindowsfont(400, 200, 48, 270, 3, 1, "arial", "DEG 270");
TSCObj.ActiveXbarcode("100", "40", "128", "50", "1", "0", "2", "2",
"123456789");
TSCObj.ActiveXprintlabel("1", "1");
TSCObj.ActiveXcloseport();
楼主解决了吗?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。