node-native-printer icon indicating copy to clipboard operation
node-native-printer copied to clipboard

listPrinters promise fails (System.Drawing.Common not found)

Open sontek opened this issue 6 years ago • 1 comments

Describe the bug When I try to list printers the promise errors out:

https://i.imgur.com/zZN0riy.png

To Reproduce

  1. Get the electron edge starter kit:

https://github.com/agracio/electron-edge-js-quick-start

  1. Modify renderer.js inside the window.onload to do this:
  const printer = require('node-native-printer');
    const printers = printer.listPrinters();
    console.log("==== printers", printers);
    printers.then((result) => {
      console.log("=== printer result", result);
    });
  1. Run the code, you'll hit the error I included in the screenshot above.
  2. See error

Expected behavior I should be able to list printers in electron + Windows 10

OS

  • Windows 10

sontek avatar Jun 21 '19 15:06 sontek

I think System.Drawing.Common is not included in .NET Core and it should be a nuget dependency on the build of node-native-printer if core is used

sontek avatar Jun 21 '19 15:06 sontek