* Electron Version 6.0.0-beta.12
* Operating System Windows 10 64 bit

Expected Behavior
webContents.print() should send print a job to the specified printer

Actual behavior
Nothing happens. Callback gets called much latter, for example on program exit.

To Reproduce
let print_options = { 
    silent: true,
    printBackground: true,
    deviceName: barcode_device_name 
}
print_window.webContents.print(print_options, (data) => {
    console.log(`print result: ${data}`)
})

Related to #17260
shell/browser/api/atom_api_web_contents.cc
std::vector<mate::Dictionary> page_ranges;
  if (options.Get("pageRanges", &page_ranges)) {
    std::unique_ptr<base::ListValue> page_range_list(new base::ListValue());
    for (size_t i = 0; i < page_ranges.size(); ++i) {
      int from, to;
      if (page_ranges[i].Get("from", &from) && page_ranges[i].Get("to", &to)) {
        std::unique_ptr<base::DictionaryValue> range(
            new base::DictionaryValue());
        range->SetInteger(printing::kSettingPageRangeFrom, from);
        range->SetInteger(printing::kSettingPageRangeTo, to);
        page_range_list->Append(std::move(range));
      } else {
        continue;
      }
    }
    if (page_range_list->GetSize() > 0)
      settings.SetList(printing::kSettingPageRange, std::move(page_range_list));
  }
  
  printing::DuplexMode duplex_mode;
  options.Get("duplexMode", &duplex_mode);
  settings.SetInteger(printing::kSettingDuplexMode, duplex_mode);
  
  mate::Dictionary dpi_settings;
  int dpi = 72;
  if (options.Get("dpi", &dpi_settings)) {
    int horizontal = 72;
    dpi_settings.Get("horizontal", &horizontal);
    settings.SetInteger(printing::kSettingDpiHorizontal, horizontal);
    int vertical = 72;