Anxiety Management Exercise Planner Anxiety Management Exercise Planner 1. Create Your Plan 2. Your Management Plan How are you feeling right now? Slightly Anxious / Unsettled Moderately Anxious / Stressed Highly Anxious / Overwhelmed What type of exercise feels right for you? Calm Breathing Mindful Grounding Quick Physical Movement Your Anxiety Management Plan A personalized plan to find calm. These exercises are for managing acute feelings of anxiety. They are not a substitute for professional therapy or medical advice. Practice them in a safe, comfortable space. Download Plan as PDF ← Back Generate My Plan → ${ex.instructions} ${ex.duration} `).join(''); }; // --- PDF DOWNLOAD --- const downloadPDF = () => { const { jsPDF } = window.jspdf; html2canvas(elements.pdfArea, { scale: 2, useCORS: true }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const ratio = canvas.width / canvas.height; let imgWidth = pdfWidth - 20; let imgHeight = imgWidth / ratio; if (imgHeight > pdfHeight - 20) { imgHeight = pdfHeight - 20; imgWidth = imgHeight * ratio; } const x = (pdfWidth - imgWidth) / 2; pdf.addImage(imgData, 'PNG', x, 10, imgWidth, imgHeight); pdf.save('Anxiety-Management-Plan.pdf'); }).catch(err => { console.error("Error generating PDF:", err); alert("Could not generate PDF. Please try again."); }); }; elements.pdfBtn.addEventListener('click', downloadPDF); });