'); printWindow.document.write(printContents); printWindow.document.write(''); printWindow.document.close(); // Wait for the window to load and then print printWindow.onload = function() { setTimeout(function() { printWindow.focus(); printWindow.print(); printWindow.close(); }, 500); // Increase this value if necessary }; }); }); function rotateIcon(iconNumber) { var icon = document.getElementById('icon-' + iconNumber); icon.classList.toggle('rotated'); }