electron: webContents.print doesn't do anything on Windows 7

  • Electron version: 0.37.2
  • Operating system: Windows 7 64-bit

I have tried to call mainWindow.webContents.print, which showed the printer dialog but when I choose the printer, it just does nothing. Not even an error.

I have tried with multiple printers such as physical and virtual one (like print to XPS/PDF).

I suspect its my code, so I tried this this example as well but I got same result.

After that I tested it on another computer (Microsoft surface 4) and still nothing.

Then I run the same code on Mac OS, and it was working ok.

So I’m confusing right now and wondering if anybody else have same issue or not…

PS: webContents.printToPDF was also okay on windows since I guess has nothing to do with OS printing functionality.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 25 (2 by maintainers)

Most upvoted comments

Hi guys,

this issue is still here with electron 1.6.1 and newer. This is actually one of the worst bugs if you need an app that can print.

I downgraded to Version 1.4.15, it’s working with this electron version.

Cheers, Nick

The problem seems to be related to missing pdf.dll from electron packages since 0.37.3.

A temporary solution is to copy pdf.dll from 0.36.12 electron zip to 0.37.3 or 0.37.5 zips for windows and all will work as far as I tested.

Any updates on this?

I am on 1.6.13, and the silent : true doesn’t work, and pops open the default windows print settings dialog. OS: Windows 10. Copying pdf.dll from 0.63.1 in to the node_modules/electron/dist folder didn’t help.

Any ideas?

Same issue here. Rolling back to 1.4.15 worked, but it’s a shame to not be using the latest version or manually handle the DLL dependency.

I’m still having this issue, all I get is the status spooling.