Reputation: 19
Table border are missing while window.print in java script. this was my javascript code which i used for printing.
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
Upvotes: 0
Views: 934
Reputation: 373
Your code will not output a border because you've not told it to. It's not exactly the same as your issue but this might help to answer your question: no border on HTML table when printing
You'll need to set some css like border:1px solid #000;
to the table element to give it a border.
Upvotes: 2