Print Document Creation - Epson TM-T88V-i User Manual

Epos-print api
Hide thumbs Also See for TM-T88V-i:
Table of Contents

Advertisement

Print Document Creation

A print document is created using an ePOS-Print Builder object.
Create an ePOS-Print Builder object using the constructor for it; create a print document using the object's
methods; and then acquire that print document using the toString method. For details, refer to
functions
(p.59).
Refer to the following program for print document creation.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>TITLE</title>
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
function buildMessage() {
//Create an ePOS-Print Builder object
var builder = new epson.ePOSBuilder();
//Create a print document
builder.addTextLang('en')
builder.addTextSmooth(true);
builder.addTextFont(builder.FONT_A);
builder.addTextSize(3, 3);
builder.addText('Hello,\tWorld!\n');
builder.addCut(builder.CUT_FEED);
//Acquire the print document
var request = builder.toString();
alert(request);
}
</script>
</head>
<body>
<button onclick="buildMessage()">Run</button>
</body>
</html>
44
List of API
Create a print document

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm-t70-iTm-l90-i

Table of Contents