Epson TM-T20II-i ePOS-Print XML Users Manual - Page 46

To create a graphic print document

Page 46 highlights

To create a graphic print document: Create a graphic print document using the image element in the epos-print root element. Set the image size using an attribute of the image element. For graphics, specify raster graphic bit-image data using a base 64 encoded character string.  Refer to the following program for print document creation. To create a print document with a checkered flag raster image: function createDocument() { //Start print document creation. var request = ''; //Create a print document // request += '8PDw8A8PDw/w8PDwDw8PD/ Dw8PAPDw8P8PDw8A8PDw/w8PDwDw8PD/Dw8PAPDw8P'; // request += ''; //End print document creation. request += ''; } • This section describes how to print a raster image. In addition, there is also a method of printing graphics registered in the NV memory of the printer. For details, refer to (p.76). • For details on how to create raster images, refer to Encoding Graphic Data (p.145). Print image 46

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146

46
To create a graphic print document:
Create a graphic print document using the image element in the epos-print root element. Set the image
size using an attribute of the image element. For graphics, specify raster graphic bit-image data using a
base 64 encoded character string.
Refer to the following program for print document creation.
Print image
This section describes how to print a raster image. In addition, there is also a method of printing
graphics registered in the NV memory of the printer. For details, refer to
<logo> (p.76)
.
For details on how to create raster images, refer to
Encoding Graphic Data (p.145)
.
<script type="text/javascript">
function createDocument() {
//Start print document creation.
var request = '<epos-print xmlns="http://www.epson-pos.com/schemas/2011/03/
epos-print">';
//Create a print document
//<Specify the raster image>
request += '<image width="8" height="48">8PDw8A8PDw/w8PDwDw8PD/
Dw8PAPDw8P8PDw8A8PDw/w8PDwDw8PD/Dw8PAPDw8P</image>';
//<Specify the feed cut>
request += '<cut type="feed"/>';
//End print document creation.
request += '</epos-print>';
}
</script>
To create a print document with a checkered flag raster image: