Select your printer model

Parameters are refined by the selected printer.

print method


Prints image data drawn in HTML5 Canvas.

The print job ID can be specified.

Converts the specified area of an HTML5 Canvas RGBA full-color image into raster data according to halftone property and brightness property setting. One pixel of an image corresponds to one dot of the printer. When a transparent color is contained in the image, the background of the image is assumed to be white.

Syntax

 
print(canvas, cut, mode);
 
print(canvas, cut, mode, printjobid);

Parameter

canvas

Value

Description

canvas

Specifies an HTML5 Canvas object.

cut

Value

Description

true

Uses the automatic cutting function.

false

Does not use the automatic cutting function.

undefined

Does not use the automatic cutting function.

mode

Value

Description

MODE_MONO

Monochrome (2 scales)

MODE_GRAY16

Multi-gradation (16 scales)

undefined

Monochrome (2 scales)

printjobid

Value

Description

String

Alphanumeric characters, underscore, hyphen, and period in 1 to 30 digits can be used.

Exception

Exception

Object type

Parameter " ... " is invalid

Error

Supplementary explanation

  • HTML5 Canvas data containing image data downloaded from different domains cannot be printed. A security error occurs due to the Same-Origin policy of JavaScript.
  • Multi-gradation printing can be used in the standard mode but not in the page mode.
  • The specification function of the print job ID can be used in the TM-i series/TM-DT series.
 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.


Epson ePOS SDK for JavaScript

Jump to the top