I have developed the SAPUI5 application which is having a print option. When I click on print button, I am writing print area content into document and giving print by using window.print();
var printContents = document.getElementById("printArea").innerHTML;
var win = window.open("", "PrintWindow");
win.document.write("<div class='page'>" + printContents + "</div>");
setTimeout(function() {
win.print();
win.stop();
}, 2000);
But the issue is I am missing SAPUI5 default library CSS in my print. I need SAPUI5 default style sheet in my print,how to fix it?