Window.print cannot work in node-webkit

I have a web project with an expression. when i convert project to node-webkit use package.json

{
  "name": "hello"
  "main": "http://localhost:3001",
  "node-main": "index.js",
  "window": {
    "toolbar": false,
    "frame": true,
    "width": 1170,
    "height": 780
  },
  ...
}

      

it can work well. but there is a button on the same page, it will call window.print()

on click and now it can't work in node-webkit app.

Any idea on what I am doing wrong? or is there any other solution to print the page?

+3


source to share





All Articles