Как я сделал для печати счетов после успешного ответа от бэкэнда следующим образом:
var mywindow = window.open('_blank', '', '');
mywindow.document.write('<html><head></head><body onload="setTimeout(myFunction(){window.print();}, 3000)">');
var printContents = '<style>@media print { .print_hide{display: none;} } </style>';
printContents += '<div id="print-content"><form><table width="100%" height="100"><tbody>';
var inputs, index; inputs = document.querySelectorAll('input,select');
printContents+='<div style="width:765px; float:left; height:72px;">';
printContents +='</tbody></table>';
mywindow.document.write(printContents);
mywindow.document.write('</body></html>');
mywindow.document.close();
Откроется новое окно ...