PrinterInfo 对象¶
name字符串 - 操作系统识别的打印机名称。displayName字符串 - 在打印预览中显示的打印机名称。description字符串 - 打印机类型的更详细描述。options对象 - 包含可变数量的平台特定打印机信息的对象。
status 所表示的数字在不同平台上含义不同:在 Windows 上,其可能的值可以在这里找到,在 Linux 和 macOS 上则可以在这里找到。
示例¶
下面是可能设置的一些附加选项的示例,这些选项在每个平台上可能不同。
{
name: 'Austin_4th_Floor_Printer___C02XK13BJHD4',
displayName: 'Austin 4th Floor Printer @ C02XK13BJHD4',
description: 'TOSHIBA ColorMFP',
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://localhost/printers/Austin_4th_Floor_Printer___C02XK13BJHD4',
system_driverinfo: 'T'
}
}
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 el/electron