Mutual NDA (Non-Disclosure Agreement) Generator Mutual NDA Generator Create a customized Mutual Non-Disclosure Agreement for your business dealings. 1. Party Information 2. Agreement Details 3. Generate NDA Disclosing Parties Party One Full Legal Name Full Address 123 Innovation Drive, Austin, TX 78701, USA Party Two Full Legal Name Full Address 456 Enterprise Way, San Francisco, CA 94105, USA Agreement Terms Effective Date Confidentiality Term (Years) Purpose of Disclosure To explore a potential business relationship, including but not limited to joint product development, marketing, and strategic partnership opportunities. Governing Law (State) Generated Mutual Non-Disclosure Agreement Download NDA as PDF Previous Next Name: Title: ${p2Name} By: Name: Title: `; const outputContainer = document.getElementById('nda-output-content'); if(outputContainer) outputContainer.innerHTML = ndaHTML; }; const handleDownloadPdf = async () => { const { jsPDF } = window.jspdf; const content = document.getElementById('nda-output-content'); if (!content) return; const originalButtonText = downloadPdfBtn.innerHTML; downloadPdfBtn.innerHTML = 'Generating...'; downloadPdfBtn.disabled = true; try { const canvas = await html2canvas(content, { scale: 2, useCORS: true, 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('Mutual_NDA.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); // Initial setup updateNavButtons(); });