Intellectual Property Licensing Compliance Checker Intellectual Property Licensing Compliance Checker Analyze your use of licensed assets against common IP license terms to identify potential compliance issues. 1. License Details 2. Usage Details 3. Compliance Report Licensed Asset & Agreement Asset Name / Description License Type Royalty-Free Commercial MIT License (Software) Creative Commons BY Creative Commons BY-NC (Non-Commercial) License Acquisition Date Permitted Territory How Are You Using the Asset? Is the asset used in a product for sale (e.g., t-shirt, app)? No Yes Have you included the original MIT license and copyright notice in your software distributions? Yes No Have you provided appropriate attribution to the original creator? Yes No Is your use of the asset for commercial purposes? No Yes Have you provided appropriate attribution to the original creator? Yes No Generated Compliance Report Download Report as PDF Previous Next ${text} `; } const handleDownloadPdf = async () => { const { jsPDF } = window.jspdf; const content = document.getElementById('report-output-content'); if (!content) return; const originalButtonText = downloadPdfBtn.innerHTML; downloadPdfBtn.innerHTML = 'Generating...'; downloadPdfBtn.disabled = true; try { const canvas = await html2canvas(content, { scale: 2, backgroundColor: '#ffffff' }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF('p', 'mm', 'a4'); const pdfWidth = pdf.internal.pageSize.getWidth(); const margin = 15; const contentWidth = pdfWidth - (margin * 2); const imgProps = pdf.getImageProperties(imgData); const imgHeight = (imgProps.height * contentWidth) / imgProps.width; let heightLeft = imgHeight; let position = margin; pdf.addImage(imgData, 'PNG', margin, position, contentWidth, imgHeight); heightLeft -= (pdf.internal.pageSize.getHeight() - margin * 2); while (heightLeft > 0) { position = heightLeft - imgHeight + margin; pdf.addPage(); pdf.addImage(imgData, 'PNG', margin, position, contentWidth, imgHeight); heightLeft -= (pdf.internal.pageSize.getHeight() - margin); } pdf.save('IP_Compliance_Report.pdf'); } catch (error) { console.error("PDF generation failed:", error); } finally { downloadPdfBtn.innerHTML = originalButtonText; downloadPdfBtn.disabled = false; } }; // Event Listeners tabButtons.forEach((btn, i) => btn.addEventListener('click', () => switchTab(i + 1))); prevBtn.addEventListener('click', () => switchTab(currentTab - 1)); nextBtn.addEventListener('click', () => switchTab(currentTab + 1)); downloadPdfBtn.addEventListener('click', handleDownloadPdf); licenseTypeSelect.addEventListener('change', updateUsageForm); // Initial setup updateUsageForm(); updateNavButtons(); });