electron: 'silent: true' for printing not working in version 5.

Hey there

I have upgraded an app to version 5 as in the list of fixes was the silent printing bug, but the issue is still the same.

My code: printWindow.webContents.print({silent: true});

Results in nothing happening at all. No errors thrown or anything. Changing it back to false, brings up the window to select the printer and then it prints perfectly fine. It’s just the silent mode that doesn’t work.

I am running this on Windows 10, with Node version 10.15.3. I can not try with a different OS as the printer only has drivers for Windows.

Many thanks, Michael

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 18
  • Comments: 33 (6 by maintainers)

Most upvoted comments

Cheers… I have downgraded to Electron V3.1.10, and now its print() function working fine, if we set printer name in argument to print function then that printer get selected by default.

Thank a lot all.

Still not working on 6.0.0-beta.13 where this PR is merged

the silent printing works well for me in v6.0.0-beta, but it doesn’t work if deviceName is provided same problem here, i downgraded 3.1.10,it works well.

No need to downgrade. Update to 8.2.0. It’s working now.

the silent printing works well for me in v6.0.0-beta, but it doesn’t work if deviceName is provided

@vgribdev I found the same, that if deviceName is specified it will not work and callback never called, without deviceName it works and pints on the default device

@hiteshambaliya The only way I’ve found it to work for now is downgrading to Electron 3.

Got silent: true working at Electron 13.2.1 with printBackground: false, although deviceName doesn’t work and the default printer gets selected.

Tested v5.0.7 on Windows 10 and callback is never called with deviceName and, if I remove the deviceName the callback is called, but nothing is sent to the printer…

I tried 6.0.0-beta.13 and it’s still not working for me too.

Actually, the callback it’s called with true but the print doesn’t start

hi, wich release will include this fix?