Methods
addLine(text)
store a line to be submitted with submitPrint
Parameters:
Name | Type | Description |
---|---|---|
text |
string | line of text, which must end in "\n" |
- Source:
reset()
clear out any stored lines in this print handler
- Source:
setLines(lines)
override currently stored lines
Parameters:
Name | Type | Description |
---|---|---|
lines |
Array.<String> | an array of lines to be printed, each ending with "\n" |
- Source:
submitPrint(log)
submit all stored lines to the receipt printer
Parameters:
Name | Type | Default | Description |
---|---|---|---|
log |
false | if true, log each printed line to the js console |
- Source:
(static) printLines(lines, log)
static method to print a given set of lines without instantiating a PrintHandler object.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
lines |
Array.<string> | each line to print must end in "\n" |
|
log |
boolean | false | if true, log each printed line to the js console |
- Source: