Consumer Financial Protection Compliance Assistant

Consumer Financial Protection Compliance Assistant

Assess your business practices against key consumer protection principles.

Business Profile

Compliance Checklist

Answer "No" if a practice might represent a potential compliance risk.

Advertising & Marketing

Lending & Credit Practices

Debt Collection

Compliance Report

Disclaimer: This tool provides a preliminary risk assessment for informational purposes only. It is not legal advice and does not cover all aspects of consumer financial law. Consult a qualified attorney for professional legal counsel.

Recommendation: ${issue.text}

`).join('') : '

No potential compliance issues were identified based on your responses. It is still recommended to conduct regular internal audits.

'; const reportHTML = `

Assessment Summary

Business Name: ${businessName}

Industry: ${businessIndustry}

Overall Risk Level: ${riskLevel}

Identified Issues & Recommendations

${issuesHTML}
`; document.getElementById('report-output').innerHTML = reportHTML; document.getElementById('pdf-preview').innerHTML = `

Consumer Financial Protection Report

` + reportHTML; } // --- PDF Download --- const downloadPdfBtn = document.getElementById('download-pdf-btn'); async function downloadPDF() { const { jsPDF } = window.jspdf; const content = document.getElementById('pdf-preview'); const container = document.getElementById('pdf-container'); downloadPdfBtn.textContent = 'Generating...'; downloadPdfBtn.disabled = true; container.classList.remove('hidden'); container.style.position = 'absolute'; container.style.left = '-9999px'; container.style.top = '0'; try { const canvas = await html2canvas(content, { scale: 2, useCORS: true }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const margin = 40; const usableWidth = pdfWidth - margin * 2; const imgScaledHeight = (canvas.height * usableWidth) / canvas.width; let heightLeft = imgScaledHeight; pdf.addImage(imgData, 'PNG', margin, margin, usableWidth, imgScaledHeight); heightLeft -= (pdf.internal.pageSize.getHeight() - margin * 2); let position = -pdf.internal.pageSize.getHeight() + margin * 2; while (heightLeft > 0) { pdf.addPage(); pdf.addImage(imgData, 'PNG', margin, position, usableWidth, imgScaledHeight); heightLeft -= pdf.internal.pageSize.getHeight(); position -= pdf.internal.pageSize.getHeight(); } pdf.save('Consumer-Financial-Protection-Report.pdf'); } catch (error) { console.error("Error generating PDF:", error); } finally { container.classList.add('hidden'); container.style.position = ''; container.style.left = ''; container.style.top = ''; downloadPdfBtn.textContent = 'Download PDF Report'; downloadPdfBtn.disabled = false; } } downloadPdfBtn.addEventListener('click', downloadPDF); updateDisplay(); });
Scroll to Top