EasyManua.ls Logo

Epson TM-T88V-i - Page 46

Epson TM-T88V-i
258 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
46
To create a graphic print document:
To create a graphic print document, store a raster image obtained by rendering an image in HTML5
Canvas into the command buffer using the addImage method. Refer to the following program.
Thissectiondescribeshowtoprintarasterimage.Inaddition,thereisalsoamethodofprinting
graphicsregisteredintheNVmemoryoftheprinter.Fordetails,refertoaddLogomethod(p.89).
<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();
//Render an image in HTML5 Canvas
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
context.drawImage(document.getElementById('logo'), 0, 0, 200, 70);
//Create a print document
builder.addTextAlign(builder.ALIGN_CENTER);
builder.addImage(context, 0, 0, canvas.width, canvas.height, builder.COLOR_1);
builder.addCut(builder.CUT_FEED);
//Acquire the print document
var request = builder.toString();
}
</script>
To create a print document for the image file “logo.bmp”

Table of Contents

Other manuals for Epson TM-T88V-i

Related product manuals