-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
44 lines (34 loc) · 1.02 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const printer = require('node-gyp-build')(__dirname);
let isSettingsSet = false;
function getDefaultPrinter() {
return printer.getDefaultPrinter();
}
function sendToPrinter(html, pageHeight, pageWidth, page_size, success, error) {
return printer.sendToPrinter(html, pageHeight, pageWidth, page_size, success, error);
}
function initSettings() {
if (isSettingsSet) {
return;
}
isSettingsSet = true;
return printer.initSettings();
}
function deinitSettings() {
if (!isSettingsSet) {
return;
}
isSettingsSet = false;
return printer.deinitSettings();
}
function getJobStatus(job_id) {
return printer.getJobStatus(job_id);
}
function checkIsJobCompleted(job_id) {
return printer.checkIsJobCompleted(job_id);
}
module.exports.getDefaultPrinter = getDefaultPrinter;
module.exports.sendToPrinter = sendToPrinter;
module.exports.initSettings = initSettings;
module.exports.deinitSettings = deinitSettings;
module.exports.getJobStatus = getJobStatus;
module.exports.checkIsJobCompleted = checkIsJobCompleted;