Select your printer model

Parameters are refined by the selected printer.

<image>


Specifies image data in the raster format. (Data type xs:base64Binary)

Attribute

width

Attribute value

Description

“0” to “65535”

Specifies the image width in dots.

height

Attribute value

Description

“0” to “65535”

Specifies the image height in 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”

Monochrome (2 scales)

“gray16”

Multi-gradation (16 scales)

Sample program

  • Prints a raster image filling 8 dots x 8 dots area.
  •  
    <image width="8" height="8">//////////8=</image>
    

Supplementary explanation

  • Multi-gradation printing can be used in the standard mode but not in the page mode.
  • The read quality of a barcode or 2D symbol printed as a multi-gradation raster image is not guaranteed. Use two-scale printing.
  • To print a raster image at a high speed, set the align attribute to left and the width attribute value to a multiple of 8 which does not exceed the sheet width of the printer.
  • In the page mode, because image data is printed at the current print position with the lower-left dot of the image data as the reference point, the print position does not move.
  • In the page mode, adjust the print position so that the image data fits within the print area.
  • If a raster image is printed in multi-gradation, it will be printed intermittently due to an increased data quantity and white lines may appear in the printed image.
  • The width and height attributes are mandatory.
  • If the color and mode attributes are omitted, the following values are set:
    • color: color_1
    • mode: mono
  • Colors assigned to the first to fourth colors depend on the printer model.
  • The align attribute does not work in the page mode.
  • Specify the align attribute at the "beginning of the line.”
  • The align attribute setting in the <image> element also applies to the align attribute in the <text>, <logo>, <barcode>, and <symbol> elements.
  • Use the ePOS-Print XML generation tool or your own application to create raster image data.
    Pay attention to the following when using your own application to create raster image data:
    • For two-scale printing: Set the image width to a multiple of 8 or set missing bits to 0.
    • For 16-scale printing: Set the image width to a multiple of 2 or set missing bits to 0.
  • 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-Device XML includes patented or patent pending functions. The contents must not be disclosed to third parties.


ePOS-Device XML

Jump to the top