what I tried to do is use the Bootstrap styles to be able to print them in a little window but apparently it doesn't send them, and it doesn't open the print window:
<script>
function printDiv()
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin= window.open('', '', 'height=900, width=800');
newWin.document.open();
newWin.document.write('<html>');
newWin.document.write('<link rel="stylesheet" media="screen,print" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">');
newWin.document.write('<body onload="window.print()">'+divToPrint.innerHTML+'</body>');
newWin.document.write('</html>');
newWin.document.close();
setTimeout(function(){newWin.close();},10);
}
</script>
At first glance it seems to work fine, just a small detail that you have to change:
put it like this:
so you have at least 10 seconds to watch it before it doesn't close.
Example: https://jsfiddle.net/nk1Lgtfo/