187
Chapter 5 ePOS-Print Canvas API
5
Example
To set 58mm receipt (without black mark):
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
<!--
var address = 'http://192.168.192.168/cgi-bin/epos/service.cgi?devid=local_printer';
var canvas = document.getElementById('myCanvas');
var epos = new epson.CanvasPrint(address);
epos.paper = epos.PAPER_RECEIPT;
epos.layout = { width: 580 };
epos.cut = true;
epos.print(canvas);
//-->
</script>
To set 58mm receipt (with black mark):
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
<!--
var address = 'http://192.168.192.168/cgi-bin/epos/service.cgi?devid=local_printer';
var canvas = document.getElementById('myCanvas');
var epos = new epson.CanvasPrint(address);
epos.paper = epos.PAPER_RECEIPT_BM;
epos.layout = { width: 580, height: 0, margin_top:15, offset_cut: 0 };
epos.cut = true;
epos.print(canvas);
//-->
</script>
To set 58mm die-cut label (without black mark):
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
<!--
var address = 'http://192.168.192.168/cgi-bin/epos/service.cgi?devid=local_printer';
var canvas = document.getElementById('myCanvas');
var epos = new epson.CanvasPrint(address);
epos.paper = epos.PAPER_LABEL;
epos.layout = { width: 580, height: 0, margin_top: 15, margin_bottom: -15,
offset_cut: 25 };
epos.cut = true;
epos.print(canvas);
//-->
</script>
Summary of Contents for TM-T88V-i
Page 10: ...10 ...
Page 14: ...14 ePOS Print Canvas API Monochrome or Grayscale Monochrome ...
Page 160: ...160 ...
Page 258: ...258 ...