GDP Growth & Stock Market Trend Prediction

GDP Growth & Stock Market Trend Prediction

Analysis for 2025 Based on Consensus Forecasts

Global & Regional GDP Forecast

Select a region to view the economic forecast for 2025. Data is aggregated from leading financial institutions.

${relationshipData.summary}

`; } /** * Handles PDF download functionality. */ window.downloadPDF = async function() { // Check if libraries are loaded if (typeof window.jspdf === 'undefined' || typeof window.html2canvas === 'undefined') { alert('PDF generation library not loaded. Please try again later.'); console.error("jspdf or html2canvas not found."); return; } const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('pdf-content'); if (!pdfContent) { console.error("PDF content area not found."); return; } try { const canvas = await html2canvas(pdfContent, { scale: 2, // Improve resolution backgroundColor: '#ffffff' }); 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 canvasWidth = canvas.width; const canvasHeight = canvas.height; const ratio = canvasWidth / canvasHeight; const imgWidth = pdfWidth - 20; // with margin const imgHeight = imgWidth / ratio; let position = 10; pdf.addImage(imgData, 'PNG', 10, position, imgWidth, imgHeight); pdf.save('GDP_Stock_Prediction_Report-2025.pdf'); } catch (error) { console.error('Error generating PDF:', error); alert('An error occurred while generating the PDF.'); } }; // --- INITIALIZATION --- regionSelect.addEventListener('change', displayGdpForecast); marketSelect.addEventListener('change', displayMarketForecast); // Initial content display changeTab(1); displayGdpForecast(); displayMarketForecast(); });
Scroll to Top