'); mywindow.document.close(); // necessary for IE >= 10 mywindow.focus(); // necessary for IE >= 10*/ mywindow.print(); mywindow.close(); return true; } function saveDiv(divId) { doc.fromHTML(`Invoice` + document.getElementById(divId).innerHTML + ``); doc.save('invoice.pdf'); return true; }