AI-Based Financial Crime Risk Monitoring System
Origin Country: ${origin}
Destination Country: ${destination}
Customer Risk Profile: ${profile.charAt(0).toUpperCase() + profile.slice(1)}
Risk Score: ${riskScore.toFixed(2)}%
Risk Level: ${riskLevel}
${notes ? `Additional Notes: ${notes}
` : ''} `; document.getElementById('riskResult').innerHTML = resultHTML; }; window.downloadRiskReport = function () { const resultElement = document.getElementById('riskResult'); if (!resultElement.innerHTML.trim()) { alert('Please evaluate risk before downloading the report.'); return; } html2canvas(resultElement).then(canvas => { const imgData = canvas.toDataURL('image/png'); const { jsPDF } = window.jspdf; const pdf = new jsPDF(); const imgProps = pdf.getImageProperties(imgData); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; pdf.addImage(imgData, 'PNG', 0, 10, pdfWidth, pdfHeight); pdf.save("Financial_Crime_Risk_Report.pdf"); }); }; });