- Source:
Namespaces
Members
(static, constant) version :string
Version of this JavaScript library
Type:
- string
- Source:
Methods
(static) print(config, data, signatureopt, signingTimestampopt) → {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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object.<Config> | Previously created config object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data |
Array.<(Object|string)> | Array of data being sent to the printer. String values are interpreted the same as the default [raw] object value.
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signature |
boolean |
<optional> |
Pre-signed signature of JSON string containing call , params , and timestamp . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signingTimestamp |
number |
<optional> |
Required with signature . Timestamp used with pre-signed content. |
- Source:
- See:
-
- qz.config.create
Returns:
- Type
- Promise.<(null|Error)>