TSC条形码打印

一、 条形码打印配置步骤:

下载dll: 点击打开链接

1. 安装打印机及驱动;
2. 将logo图片放到”C“盘下;如:”C:/hxsd.pcx“;
3. 将TSCActiveX.dll放在window -> system下;
4. 浏览器设置:工具->internet选项->安全->自定义级别->对未标记为可安全之星脚本的ActiveX控件初始化并执行脚本(不安全)
5. 运行-》Regsvr32 TSCActiveX.dll;
6. 将TSCLIB.dll放在window -> system下;
7. 运行-》Regsvr32 TSCLIB.dll;
二、 具体应用时大致js如下:


<script type="text/javascript">
function printBar() {
var time = new Date();
time = time.format('yyyy-MM-dd hh:mm:ss');
var TSCObj;
TSCObj = new ActiveXObject("TSCActiveX.TSCLIB");
TSCObj.ActiveXabout();
TSCObj.ActiveXopenport ("TSC TTP-342 Plus");
TSCObj.ActiveXdownloadpcx ("C:/hxsd.pcx","hxsd.pcx");
TSCObj.ActiveXsetup ("60","40","3","12","0","2","0");
TSCObj.ActiveXsendcommand ("SET TEAR ON");
TSCObj.ActiveXclearbuffer();
TSCObj.ActiveXprinterfont ("10","10","4","0","8","8","");
TSCObj.ActiveXsendcommand ("PUTPCX 40,40,\"hxsd.pcx\"");
TSCObj.ActiveXwindowsfont (40, 150, 45, 0, 2, 0, "黑体", "AOC显示器");
TSCObj.ActiveXwindowsfont (40, 400, 45, 0, 2, 0, "黑体", "AOC201103310000001");
TSCObj.ActiveXbarcode ("40", "200", "128", "195", "0", "0", "3", "3", "AOC201103310000001");
TSCObj.ActiveXprintlabel ("1","1");
TSCObj.ActiveXcloseport();
}
</script>




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值