Addimage Method - Epson TM-T88V-i User Manual

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

Advertisement

addImage method

Adds raster image printing to the command buffer.
Prints graphics rendered in HTML5 Canvas.
Converts the specified range in a RGBA full-color image of HTML5 Canvas into raster image data according
to the settings of the halftone and brightness properties. One pixel in an image equals to one printer dot.
When an image contains any transparent color, the background color of the image is assumed to be white.
If an HTML5 Canvas image contains images downloaded from different domains, you cannot 
print the image. In this case, a security error occurs due to violation of the same origin policy of 
JavaScript.
To print a raster image at high speed, specify ALIGN_LEFT for the addTextAlign method (p. 
66), and specify a multiple of 8 not exceeding the printerʹs paper width for the width parameter 
of this API.
• In page mode, a raster image is laid out in the current print position with the reference point 
being its bottom left dot.  The print position will not move. 
• Multiple tone printing is not supported in Page Mode. Multiple tone graphic printing is 
supported in Standard Mode only.
Syntax
addImage(context, x, y, width, height, color, mode);
Parameter
 context :
( Required parameter, Object type : Context)
Specifies the 2D context of HTML5 Canvas.
 x :
( Required parameter, Object type : Number)
Specifies the horizontal start position in the print area. Specifies an integer from 0 to 65535.
 y :
( Required parameter, Object type : Number)
Specifies the vertical start position in the print area. Specifies an integer from 0 to 65535.
 width :
( Required parameter, Object type : Number)
Specifies the width of the print area. Specifies an integer from 0 to 65535.
 height :
( Required parameter, Object type : Number)
Specifies the height of the print area. Specifies an integer from 0 to 65535.
 color :
( Optional parameter, Object type : String)
Specifies the color.
COLOR_NONE
COLOR_1 (default)
COLOR_2
COLOR_3
COLOR_4
undefined
(When not specified)
Setting
Characters are not printed.
First color
Second color
Third color
Fourth color
First color
Chapter 4 ePOS-Print API
Description
4
87

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm-t70-iTm-l90-i

Table of Contents