165
Chapter 5 ePOS-Print Canvas API
5
print method
Prints an image 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.
Syntax
1
(canvas);
2
(canvas, cut, mode);
Parameter
canvas
:
(
Required
parameter,
Object
type
:
canvas)
Specify
the
HTML5
Canvas
object
to
be
printed.
cut
:
(
Optional
parameter,
Object
type
:
Boolean)
Sets
whether
to
cut
paper.
mode
:
(
Optional
parameter,
Object
type
:
String)
Specifies
the
color
mode.
(in
firmware
Ver.1.2
and
later)
Exception
If
an
HTML5
Canvas
image
contains
images
downloaded
from
different
domains,
you
cannot
the
image.
In
this
case,
a
security
error
occurs
due
to
violation
of
the
same
origin
policy
of
JavaScript.
2
is
the
syntax
of
compatible
version.
It
is
recommended
to
use
the
syntax
of
1.
Setting
Decription
true or 1
Cuts the paper after printing
false or 0
Does not cut the paper after printing
undefined
Does not cut the paper after printing
Setting
Decription
MODE_MONO
Monochrome (two-tone)
MODE_GRAY16
Multiple tones (16-tone)
undefined
Monochrome (two-tone)
Exception
Object type
Parameter " ... " is invalid
Error
XMLHttpRequest is not supported
Error
Canvas is not supported
Error
Содержание TM-T88V-i
Страница 10: ...10 ...
Страница 14: ...14 ePOS Print Canvas API Monochrome or Grayscale Monochrome ...
Страница 160: ...160 ...
Страница 216: ...216 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm ...
Страница 218: ...218 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm ...
Страница 222: ...222 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm 58mm ...
Страница 258: ...258 ...