Select your printer model

Parameters are refined by the selected printer.

addRegisterDownloadImage method


Adds the registration of the image data drawn on the HTML5 Canvas to the command buffer.

The specified image data can be registered in the download graphics area of customer display, and can be called by addDownloadImage method.

Converts the specified range of the RGBA full color image of HTML5 Canvas to image data.

One pixel of the image corresponds to one dot of the customer display, and if a transparent color is included, the background color of the image is assumed to be white.

Syntax

 
addRegisterDownloadImage(data, key1, key2);

Parameter

context

Value

Description

context

Specifies the 2D context of HTML5 Canvas.

key1

Value

Description

Integer value from 48 to 57, 65 to 90, and 97 to 122

Specifies keycode 1.

key2

Value

Description

Integer value from 48 to 57, 65 to 90, and 97 to 122

Specifies keycode 2.

Return value

Return value

Object type

Display object

Display

Exception

Return value

Object type

Parameter " ... " is invalid

Error

Supplementary explanation

  • This API cannot be used simultaneously with other APIs.
    After executing this API, do not execute any other API until the callback is returned.
  • Execute a send method after each execution of this API to register images one by one.
  • If success is not returned in onreceive event by the send method execution results after the execution of this API, restart the printer.
    Depending on the system environment, it may take some time for the recovery process.
  • If the power supply to the customer display is cut off, the registered image is erased.
  • As the data size of the image to be registered increases, the processing time becomes longer. (Max. 320 seconds)
  • If the data size of the image to be registered is large, and the communication environment is poor, the image may not be registered in this API.
    If the image cannot be registered in this API, use a dedicated Utility software.
    For details on the dedicated Utility software, refer to the Technical Reference Guide of each customer display.
  • If an image is registered in the specified keycode, it is overwritten and registered.
  • Image data expressed in the pixel format of YCbCr422 or YCbCr420 can be used.
  • The image size should be about 100 KB although the upper limit of the image size is 1.5 MB.
  • Total size of images that can be registered is 1.5 MB.
    This API converts the image format and pixel count so that the customer displays can process the images and then register them. The conversion processing may increase the size of images, so ensure that there is sufficient free space in the download graphics area to accommodate the total size of the images to be registered.
    No error is returned when registration was not successful due to insufficient free space in the download graphics area.
  • Pixel values for width and height of an image should be even numbers.
  • When using a transmission image, use data in the png format.
  • Please use an image that matches the size of the image area in the customer display.
    Using an image larger than the size of the image area will cause the image to be trimmed to fit the size of the image area.
  • An HTML5 Canvas including images downloaded from different domains cannot be displayed.
    A security error occurs as a result of the same-origin policy of JavaScript.
 

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