Window.print () failed from the second made #282

Closed
opened 2026-01-29 16:35:38 +00:00 by claunia · 3 comments
Owner

Originally created by @RodrigoKB on GitHub (Feb 25, 2019).

When calling window.print () for the first time, printing normally occurs. If you call window.print () the second time, the print dialog box appears, I select the printer, I print, and nothing happens.

A to call window.print (), it only works again if the application is restarted.

I checked the Windows print spooler, and everything is working. I can print to other applications normally.

I found at this link https://github.com/electron/electron/issues/14705 that this error occurs in Electronjs.

Originally created by @RodrigoKB on GitHub (Feb 25, 2019). When calling window.print () for the first time, printing normally occurs. If you call window.print () the second time, the print dialog box appears, I select the printer, I print, and nothing happens. A to call window.print (), it only works again if the application is restarted. I checked the Windows print spooler, and everything is working. I can print to other applications normally. I found at this link https://github.com/electron/electron/issues/14705 that this error occurs in Electronjs.
claunia added the question label 2026-01-29 16:35:38 +00:00
Author
Owner

@georgetsiga commented on GitHub (Mar 14, 2019):

When calling window.print () for the first time, printing normally occurs. If you call window.print () the second time, the print dialog box appears, I select the printer, I print, and nothing happens.

A to call window.print (), it only works again if the application is restarted.

I checked the Windows print spooler, and everything is working. I can print to other applications normally.

I found at this link electron/electron#14705 that this error occurs in Electronjs.

I am also having a similar issue.
My code is a follows:

$scope.Print = function (printData) { console.log(printData); newWin = window.open(""); newWin.document.write(printData); newWin.print(); newWin.close(); };

When I hit print for the second time I get a blank frame even if I the printData variable is not empty (I saw this by adding console.log()).

image

@georgetsiga commented on GitHub (Mar 14, 2019): > When calling window.print () for the first time, printing normally occurs. If you call window.print () the second time, the print dialog box appears, I select the printer, I print, and nothing happens. > > A to call window.print (), it only works again if the application is restarted. > > I checked the Windows print spooler, and everything is working. I can print to other applications normally. > > I found at this link [electron/electron#14705](https://github.com/electron/electron/issues/14705) that this error occurs in Electronjs. I am also having a similar issue. My code is a follows: `$scope.Print = function (printData) { console.log(printData); newWin = window.open(""); newWin.document.write(printData); newWin.print(); newWin.close(); };` When I hit print for the second time I get a blank frame even if I the printData variable is not empty (I saw this by adding console.log()). ![image](https://user-images.githubusercontent.com/17475767/54388618-c4190400-46a6-11e9-9696-bee6f650aa8e.png)
Author
Owner

@GregorBiswanger commented on GitHub (May 16, 2019):

Unfortunately, I can not help you with this problem. Maybe it is fixed with Electron 5.0. We will release a big update on Electron.NET in the next few days. This then uses version 5.0.1 of Electron.

@GregorBiswanger commented on GitHub (May 16, 2019): Unfortunately, I can not help you with this problem. Maybe it is fixed with Electron 5.0. We will release a big update on Electron.NET in the next few days. This then uses version 5.0.1 of Electron.
Author
Owner

@RodrigoKB commented on GitHub (May 23, 2019):

thanks!

@RodrigoKB commented on GitHub (May 23, 2019): thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#282