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
Check the [serialport package documentation](https://github.com/EmergingTechnologyAdvisors/node-serialport#serialportopenoptions--object) for more options.
Escpos inherits its methods to the printers. the following methods are defined:
73
127
74
-
### text("text")
128
+
### text("text", encodeType)
75
129
76
130
Prints raw text. Raises TextError exception.
77
131
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
+
134
+
If the type is undefined, the default type is GB18030.
135
+
78
136
### control("align")
79
137
80
138
Carrier feed and tabs.
@@ -94,17 +152,22 @@ Set text properties.
94
152
95
153
align set horizontal position for text, the possible values are:
96
154
97
-
+CENTER
98
-
+LEFT
99
-
+RIGHT
155
+
+CT is the Center alignment
156
+
+LT is the Left alignment
157
+
+RT is the Right alignment
100
158
101
-
Default: left
159
+
Default: LT
102
160
161
+
### font("type")
103
162
font type could be A or B. Default: A
163
+
164
+
### size(width, heigth)
165
+
104
166
width is a numeric value, 1 is for regular size, and 2 is twice the standard size. Default: 1
167
+
105
168
height is a numeric value, 1 is for regular size and 2 is twice the standard size. Default: 1
@@ -119,6 +182,8 @@ barcode_type must be one of the following type of codes:
119
182
+ ITF
120
183
+ NW7
121
184
185
+
The EAN type automatically calculates the last parity bit. For the EAN13 type, the length of the string is limited to 12, and EAN8 is limited to 7. (#57)
186
+
122
187
width is a numeric value in the range between (1,255) Default: 64
123
188
height is a numeric value in the range between (2,6) Default: 3
124
189
position is where to place the code around the bars, could be one of the following values:
0 commit comments