Intellectual Property Rights Violation Analyzer

Intellectual Property Rights Violation Analyzer

Conduct a preliminary analysis of a potential IP rights violation.

Identify the Type of Intellectual Property

Describe the Potential Violation

Preliminary Analysis Report

Disclaimer: This tool provides a preliminary analysis for informational purposes only. It is not legal advice. Intellectual property law is complex. Consult a qualified attorney for advice on your specific situation.

Potential Claim Strength: ${strengthText}

Key Factors:

    ${keyFactors.length > 0 ? keyFactors.map(f => `
  • ${f}
  • `).join('') : '
  • Analysis based on provided information.
  • '}

Recommended Next Steps

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

IP Rights Violation Analysis 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('IP-Violation-Analysis-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