Error during Print Format for the width of above 1000

//allow wrapping of long tr var elements = document.getElementsByTagName(“tr”); var i = elements.length; while (i–) { if(elements[i].clientHeight>300){ elements[i].setAttribute(“style”, “page-break-inside: auto;”); } } window.print(); // close the window after print // NOTE: doesn’t close if print is cancelled in Chrome setTimeout(function() { window.close(); }, 1000);

I resolved it.

how did you solve it @Madhusudan?