- Source:
Namespaces
Members
(static, constant) version :string
Version of this JavaScript library
Type:
- string
- Source:
Methods
(static) print(configs, data, …argumentsopt) → {Promise.<(null|Error)>}
Send data to selected config for printing.
The promise for this method will resolve when the document has been sent to the printer. Actual printing may not be complete.
Optionally, print requests can be pre-signed:
Signed content consists of a JSON object string containing no spacing,
following the format of the "call" and "params" keys in the API call, with the addition of a "timestamp" key in milliseconds
ex.
'{"call":"","params":{...},"timestamp":1450000000}'
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
configs |
Object.<Config> | Array.<Object.<Config>> | Previously created config object or objects. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data |
Array.<(Object|string)> | Array.<Array.<(Object|string)>> | Array of data being sent to the printer. String values are interpreted as {type: 'raw', format: 'command', flavor: 'plain', data: <string>} .
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
arguments |
* |
<optional> <repeatable> |
Additionally three more parameters can be specified:
{boolean} [resumeOnError=false] Whether the chain should continue printing if it hits an error on one the the prints.
{string|Array Pre-signed signature(s) of the JSON string for containing call , params , and timestamp .
{number|Array Required to match with signature . Timestamps for each of the passed pre-signed content. |
- Source:
- See:
Returns:
- Type
- Promise.<(null|Error)>