Employee Non-Solicitation Agreement Generator

Employee Non-Solicitation Agreement Generator

Create a customized non-solicitation agreement by filling in the details below.

Parties & Dates

Scope of Agreement

Select Clauses to Include:

Generated Agreement

Disclaimer: This tool generates a standard agreement for informational purposes only. It is not legal advice. Laws regarding non-solicitation vary by state and are subject to change. Consult a qualified attorney for advice on your specific circumstances.

Title: _________________________

EMPLOYEE

Signature:

Printed Name: ${employeeName}

`; document.getElementById('agreement-preview').innerHTML = agreementHTML; document.getElementById('pdf-preview').innerHTML = agreementHTML; } // --- 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'; container.style.width = '800px'; // Set a fixed width for consistent rendering try { const canvas = await html2canvas(content, { scale: 2, useCORS: true, width: 800 }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const margin = 40; const usableWidth = pdfWidth - margin * 2; const imgScaledHeight = (canvas.height * usableWidth) / canvas.width; let heightLeft = imgScaledHeight; let position = 0; pdf.addImage(imgData, 'PNG', margin, margin, usableWidth, imgScaledHeight); heightLeft -= (pdfHeight - margin * 2); while (heightLeft > 0) { position -= (pdfHeight - margin * 2); pdf.addPage(); pdf.addImage(imgData, 'PNG', margin, position + margin, usableWidth, imgScaledHeight); heightLeft -= (pdfHeight - margin * 2); } pdf.save('Employee-Non-Solicitation-Agreement.pdf'); } catch (error) { console.error("Error generating PDF:", error); } finally { container.classList.add('hidden'); container.style.position = ''; container.style.left = ''; container.style.top = ''; container.style.width = ''; downloadPdfBtn.textContent = 'Download PDF Agreement'; downloadPdfBtn.disabled = false; } } downloadPdfBtn.addEventListener('click', downloadPDF); updateDisplay(); });
Scroll to Top