You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,15 +125,25 @@ const networkPrinter = new escpos.Printer(networkDevice);
125
125
126
126
Escpos inherits its methods to the printers. the following methods are defined:
127
127
128
-
### text("text", encodeType)
128
+
####text("text", encodeType)
129
129
130
130
Prints raw text. Raises TextError exception.
131
131
132
132
For the encode type, see the [iconv-lite wiki document](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). Escpos uses `iconv-lite` for encoding.
133
133
134
134
If the type is undefined, the default type is GB18030.
135
135
136
-
### control("align")
136
+
#### encode("encodeType")
137
+
138
+
Sets the encoding value globally. default type is GB18030 (Chinese)
139
+
140
+
```javascript
141
+
printer
142
+
.encode('EUC-KR')
143
+
.text('동해물과 백두산이 마르고 닳도록');
144
+
```
145
+
146
+
#### control("align")
137
147
138
148
Carrier feed and tabs.
139
149
@@ -146,7 +156,7 @@ align is a string which takes any of the following values:
146
156
+ VT for Vertical Tab
147
157
148
158
149
-
### align("align")
159
+
####align("align")
150
160
151
161
Set text properties.
152
162
@@ -158,16 +168,16 @@ align set horizontal position for text, the possible values are:
158
168
159
169
Default: LT
160
170
161
-
### font("type")
171
+
####font("type")
162
172
font type could be A or B. Default: A
163
173
164
-
### size(width, heigth)
174
+
####size(width, heigth)
165
175
166
176
width is a numeric value, 1 is for regular size, and 2 is twice the standard size. Default: 1
167
177
168
178
height is a numeric value, 1 is for regular size and 2 is twice the standard size. Default: 1
0 commit comments