In this section you will learn how to get information about detected printers:
For function reference and examples we assume, that we imported systeminformation as follows:
const si = require('systeminformation');
Printer
All functions in this section return a promise or can be called with a callback function (parameter cb in the function reference)
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|---|---|---|---|---|---|---|---|
| si.printer(cb) | {...} | X | X | X | printer informatiom | ||
| id | X | X | X | internal ID | |||
| name | X | X | X | printer name | |||
| model | X | X | X | printer model | |||
| uri | X | X | X | printer URI | |||
| uuid | X | X | X | printer UUID | |||
| status | X | X | X | printer status (e.g. idle) | |||
| local | X | X | X | is local printer | |||
| default | X | X | X | is default printer | |||
| shared | X | X | X | is shared printer | |||
Example
[
{
id: 0,
name: 'HP Color LaserJet CP2025 PS',
model: 'HP_Color_LaserJet_CP2025',
uri: 'http://192.168.1.1:631/printers/HP_Color_LaserJet_CP2025',
uuid: null,
local: true,
status: 'idle',
default: false,
shared: false
},
{
id: 1,
name: 'HP Color LaserJet CP2025 PS',
model: 'null',
uri: 'file:///dev/null',
uuid: null,
local: true,
status: 'idle',
default: true,
shared: true
}
]
| |||||||