How to printting part of HTML in web page?


#1

Just like the title, how to printting part of HTML in web page?Not the full page ,when i use this code blew,it printting full page which is not my requirement。

let win = null;
win = new remote.BrowserWindow({ width: 400, height: 320,});
win.on('close', () => { win = null; })
win.loadURL('someURL');
win.webContents.print({silent: false, printBackground: false});

SO,there is a command that can set HTML for the win?If you know how to solve this problem, pleace tell me,thank you very much.