跳至主要內容

PrinterInfo 物件

  • name 字串 - 印表機在作業系統中識別的名稱。
  • displayName 字串 - 印表機在預覽列印中顯示的名稱。
  • description 字串 - 印表機類型的較長描述。
  • status 數字 - 印表機目前的狀態。
  • isDefault 布林值 - 指示給定的印表機是否設定為作業系統上的預設印表機。
  • options 物件 - 包含可變數量的平台特定印表機資訊的物件。

status 代表的數字在不同平台上有不同的含義:在 Windows 上,其可能的值可以在這裡找到,而在 Linux 和 macOS 上,可以在這裡找到。

範例

以下是一些可能設定的其他選項範例,這些選項在每個平台上可能不同。

{
name: 'Austin_4th_Floor_Printer___C02XK13BJHD4',
displayName: 'Austin 4th Floor Printer @ C02XK13BJHD4',
description: 'TOSHIBA ColorMFP',
status: 3,
isDefault: false,
options: {
copies: '1',
'device-uri': 'dnssd://Austin%204th%20Floor%20Printer%20%40%20C02XK13BJHD4._ipps._tcp.local./?uuid=71687f1e-1147-3274-6674-22de61b110bd',
finishings: '3',
'job-cancel-after': '10800',
'job-hold-until': 'no-hold',
'job-priority': '50',
'job-sheets': 'none,none',
'marker-change-time': '0',
'number-up': '1',
'printer-commands': 'ReportLevels,PrintSelfTestPage,com.toshiba.ColourProfiles.update,com.toshiba.EFiling.update,com.toshiba.EFiling.checkPassword',
'printer-info': 'Austin 4th Floor Printer @ C02XK13BJHD4',
'printer-is-accepting-jobs': 'true',
'printer-is-shared': 'false',
'printer-is-temporary': 'false',
'printer-location': '',
'printer-make-and-model': 'TOSHIBA ColorMFP',
'printer-state': '3',
'printer-state-change-time': '1573472937',
'printer-state-reasons': 'offline-report,com.toshiba.snmp.failed',
'printer-type': '10531038',
'printer-uri-supported': 'ipp://127.0.0.1/printers/Austin_4th_Floor_Printer___C02XK13BJHD4',
system_driverinfo: 'T'
}
}