document.addEventListener('DOMContentLoaded', function() { const downloadButton = document.getElementById('downloadPDF'); if (downloadButton) { downloadButton.addEventListener('click', function() { // Store current theme const currentTheme = document.body.getAttribute('data-theme'); // Force light theme for PDF document.body.setAttribute('data-theme', 'light'); // Wait for theme change to apply setTimeout(function() { window.print(); // Restore original theme setTimeout(function() { document.body.setAttribute('data-theme', currentTheme); }, 100); }, 100); }); } });