Select your printer model

Parameters are refined by the selected printer.

<image>


This element allows you to specify a raster image. (data type xs: base64Binary)

Raster images are composed of pixels arranged in a grid formation. The top left corner is the origin.

Two colors (black and white) uses 1 bit per pixel, and 16 colors uses 4 bits per pixel. The bits are arranged from the highest bit of each byte. Zero padding is needed so that each line of the image is expressed in byte units.

Attribute

Note:
  • "width" and "height" must be specified.
  • If "color" and "mode" are not specified, the values shown below are set.
    • color: color_1
    • mode: mono

width

Attribute value

Description

"0" to "65535"

Specifies the image width in units of dots

height

Attribute value

Description

"0" to "65535"

Specifies the image height in units of dots

color

Attribute value

Description

"none"

No printing

"color_1"

First color

"color_2"

Second color

"color_3"

Third color

"color_4"

Fourth color

align

Attribute value

Description

"left"

Left alignment

"center"

Center alignment

"right"

Right alignment

mode

Attribute value

Description

"mono"

Black and white (2 colors)

"gray16"

Grayscale (16-step)

Sample program

Prints a 8 dots width and 8dots height raster image that is filled with solid color.

 
<epos-print xmlns="http://www.epson-pos.com/schemas/2011/03/epos-print">
	<image width="8" height="8">//////////8=</image>
</epos-print>

Supplementary explanation

  • Grayscale printing is allowed in the standard mode, not allowed in the page mode.
  • We cannot guarantee the accuracy of reading a barcode or 2D symbol printed in grayscale. Print it in black and white.
  • In order to print a raster image at a high speed, set "align" to "left" and set "width" to a multiple of 8 which does not exceed the sheet width of the printer.
  • In the page mode, set the print position of the image so that the image does not extend beyond the print area.
  • If you set to print a raster image in grayscale, the amount of data of the image increases and may be printed intermittently, which causes white streaks on printout.
  • In the page mode, the bottom left corner of the raster image is aligned with the start position for printing the image. The print start position is not automatically moved.
  • The "align" setting is ignored in the page mode.
  • When setting "align" in the standard mode, set it at the beginning of a line.
  • The "align" setting specified in this element is also applied to <text>, <logo>, <barcode>, and <symbol>.
  • Create a raster image using the ePOS-Print XML generation tool or your application. When using your application, follow the instruction below for 2 colors image or 16 colors image, whichever you want to create.
  • Attribute value

    Description

    Black and white

    Set the image width to a multiple of 8, or pad the lacked bits with zeros.

    16-step grayscale

    Set the image width to a multiple of 2, or pad the lacked bits with zeros.

  • The composition of the image data in raster format is as follows.

When the image is in two colors (black and white)

White: 0, Black: 1

Example:

Graphic

Step

Description

1

Convert the image to Base64 (byte array)

With the upper left as the origin, and with one bit per pixel, pad the data with "0" so that each line data is in bytes.

 
0xA3 0x77 0x18

2

Encode the image to Base64

 
o3cy

3

Description

 
<image width="8" height="3" color="color_1" mode="mono">o3cY</image>

When the image is in multiple tones (16 shades)

White: 15 or larger, Black: 0

Example:

Graphic

Step

Description

1

Convert the image to Base64 (byte array)

With the upper left as the origin, and with four bits per pixel, pad the data with "0" so that each line data is in bytes.

 
0xFC 0x84 0x0F 0xC8 0x40 0xFC 0x84 0x0F 0xC8 0x40 0xFC 0x84

2

Encode the image to Base64

 
/IQPyED8hA/IQPyE

3

Description

 
<image width="8" height="3" color="color_1" mode="gray16">/IQPyED8hA/IQPyE</image>
 

Quick Access

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

ePOS-Print XML includes patented or patent pending functions. The contents must not be disclosed to third parties.


Jump to the top