PrinterInfo 对象

  • name String - the name of the printer as understood by the OS.
  • displayName String - the name of the printer as shown in Print Preview.
  • description String - a longer description of the printer’s type.
  • status Number - the current status of the printer.
  • isDefault Boolean - whether or not a given printer is set as the default printer on the OS.
  • options Object - an object containing a variable number of platform-specific printer information.

The number represented by status means different things on different platforms: on Windows it’s potential values can be found here, and on Linux and macOS they can be found here.

示例

下面是一些可能在每个平台上不同的附加选项的示例。

  1. {
  2. name: 'Austin_4th_Floor_Printer___C02XK13BJHD4',
  3. displayName: 'Austin 4th Floor Printer @ C02XK13BJHD4',
  4. description: 'TOSHIBA ColorMFP',
  5. status: 3,
  6. isDefault: false,
  7. options: {
  8. copies: '1',
  9. 'device-uri': 'dnssd://Austin%204th%20Floor%20Printer%20%40%20C02XK13BJHD4._ipps._tcp.local./?uuid=71687f1e-1147-3274-6674-22de61b110bd',
  10. finishings: '3',
  11. 'job-cancel-after': '10800',
  12. 'job-hold-until': 'no-hold',
  13. 'job-priority': '50',
  14. 'job-sheets': 'none,none',
  15. 'marker-change-time': '0',
  16. 'number-up': '1',
  17. 'printer-commands': 'ReportLevels,PrintSelfTestPage,com.toshiba.ColourProfiles.update,com.toshiba.EFiling.update,com.toshiba.EFiling.checkPassword',
  18. 'printer-info': 'Austin 4th Floor Printer @ C02XK13BJHD4',
  19. 'printer-is-accepting-jobs': 'true',
  20. 'printer-is-shared': 'false',
  21. 'printer-is-temporary': 'false',
  22. 'printer-location': '',
  23. 'printer-make-and-model': 'TOSHIBA ColorMFP',
  24. 'printer-state': '3',
  25. 'printer-state-change-time': '1573472937',
  26. 'printer-state-reasons': 'offline-report,com.toshiba.snmp.failed',
  27. 'printer-type': '10531038',
  28. 'printer-uri-supported': 'ipp://localhost/printers/Austin_4th_Floor_Printer___C02XK13BJHD4',
  29. system_driverinfo: 'T'
  30. }
  31. }