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.

Licensed Asset & Agreement

${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(); });
Scroll to Top