A <text> element. Formatting carries through to the next text elements.
Alias of EposText.prototype.setAlignment
raw: boolean
raw: boolean
Whether to use "raw" mode when encoding text.
Ensures, at the cost of size, that every character is pedantically escaped. Useful for guaranteeing a parser will always get the expected value back out.
rawOptions: { width: number | undefined; height: number | undefined; smooth: boolean | undefined; align: EposAlign | undefined; font: EposFont | undefined; }
size: { width?: number; height?: number; }
smooth: boolean | undefined
text: string | undefined
size: { width?: number; height?: number; }
smooth: boolean | undefined
text: string | undefined
xmlTextChild: XMLText
xmlTextChildIsBinary: boolean
hardReset(): this
Due to ePOS Formatting carrying through to future elements in the sequence, this provides every option that EposText has as a sensible default, trying to stay close to the printer's defaults.
setAlignment(alignment: EposAlign | undefined): this
Sets the alignment of this text.
setSize(w?: number,h?: number,): this
Sets the size, as integer multiples, of each character. Printer defaults to (1,1).
setSmooth(value?: boolean): this
Sets whether the printer should smooth the edges of this text.
setTextLn(text: string): this
Similar to the println equivalent of printf, this simply wraps this.setText and adds a trailing newline.
toString(): string