Personal Emergency Preparedness Checklist

Personal Emergency Preparedness Checklist

${icon} ${item}

`; }); pdfHtml += `
`; } } pdfHtml += `
`; pdfContainer.innerHTML = pdfHtml; document.body.appendChild(pdfContainer); window.html2canvas(pdfContainer, { scale: 2 }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'portrait', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const contentWidth = pdfWidth - 80; const imgHeight = canvas.height * contentWidth / canvas.width; pdf.addImage(imgData, 'PNG', 40, 40, contentWidth, imgHeight); pdf.save('Emergency_Preparedness_Checklist.pdf'); document.body.removeChild(pdfContainer); }); }; initialize(); }); function switchTab(tabId) { const tabs = ['essentials', 'safety', 'docs']; tabs.forEach(id => { document.getElementById(`${id}-tab`).style.display = (id === tabId) ? 'block' : 'none'; document.getElementById(`tab-${id}-btn`).classList.toggle('active', id === tabId); }); }
Scroll to Top