When electron prints in windows, there is a blank page, but you can see the generated pdf file under the folder. How to deal with it?

electron loadURL website, which has js-controlled printing, prints a blank page under windows, but sees the generated pdf file under the folder, how to deal with it?
prints normally on mac os.

Mar.31,2021

did you write the printed code in the loaded page file?

electron has a printed api, which can be called directly to generate pdf for the loaded page

  

has been solved. For the problem of using 3.0beta, just switch back to 2.0.

Menu