Skip to content

Printer

In this section you will learn how to get information about detected printers:

For function reference and examples we assume, that we imported systeminspector as follows:

const si = require('@ambicuity/systeminspector');

Detected Printers

All functions in this section return a promise or can be called with a callback function (parameter cb in the function reference)

FunctionResult objectLinuxBSDMacWinSunComments
si.printer(cb)[{...}]XXXprinter informatiom
[0].idXXXinternal ID
[0].nameXXXprinter name
[0].modelXXXprinter model
[0].uriXXprinter URI
[0].uuidXprinter UUID
[0].statusXXXprinter status (e.g. idle)
[0].localXXXis local printer
[0].defaultXXis default printer
[0].sharedXXXis shared printer

Examples

Example
const si = require('@ambicuity/systeminspector');
si.printer().then(data => console.log(data));
json
[
  {
    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
  }
]
Inspector AI
SystemInspector AI initialized. How can I help you query your hardware?