Cease and Desist Letter Generator

Cease and Desist Letter Generator

Follow the steps below to generate a professional cease and desist letter.

Your Information (Sender)

Recipient's Information (Infringer)

Details of the Infringement

Demands and Legal Terms

Final Letter Preview

Below is a preview of your generated letter. Review it carefully before downloading. The final PDF will only contain the letter content itself, without this user interface.

RE: Cease and Desist Demand for ${infringementType}

Dear ${recipientName},

This letter serves as a formal demand that you immediately cease and desist from your unlawful activities concerning our property. We have discovered that you are engaging in ${infringementType.toLowerCase()} related to our property, "${infringingWork}".

Your infringing activities were first discovered on or around ${discoveryDate} and consist of the following:

${infringementDesc}

Your actions constitute a violation of our legal rights. We demand that you take immediate action to rectify this matter. You are hereby required to comply with the following demands:

    ${demands.join('')}

You are required to comply with these demands within ${deadlineDays} days of the date of this letter. Failure to do so will result in us pursuing all available legal remedies against you, including but not limited to, filing a lawsuit for damages, injunctive relief, and attorneys' fees.

This letter constitutes a demand for the preservation of all evidence related to this dispute, including all electronic data. Your failure to preserve evidence can result in sanctions from the court.

This is a serious matter. We suggest you consult with legal counsel. Your compliance is expected to avoid further legal action.

Sincerely,

____________________________
${senderName}
${senderContact || ''}

`; pdfPreview.innerHTML = letterHTML; } /** * Generates and downloads a PDF of the letter preview. */ async function downloadPDF() { const { jsPDF } = window.jspdf; const content = document.getElementById('pdf-preview'); const downloadButton = document.getElementById('download-pdf-btn'); if (!content) { console.error("PDF content area not found."); return; } // Show loading state on button downloadButton.textContent = 'Generating...'; downloadButton.disabled = true; try { const canvas = await html2canvas(content, { scale: 2, // Improve resolution useCORS: true, }); const imgData = canvas.toDataURL('image/png'); // A4 page dimensions in pixels at 96 DPI: 794x1123. // A4 in points: 595 x 842. We'll use this for jsPDF. const pdf = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const canvasWidth = canvas.width; const canvasHeight = canvas.height; // Calculate the aspect ratio to fit the content onto the PDF page const ratio = Math.min(pdfWidth / canvasWidth, pdfHeight / canvasHeight); const imgWidth = canvasWidth * ratio * 0.9; // Using 90% of width for margin const imgHeight = canvasHeight * ratio * 0.9; const marginX = (pdfWidth - imgWidth) / 2; const marginY = (pdfHeight - imgHeight) / 2; pdf.addImage(imgData, 'PNG', marginX, marginY, imgWidth, imgHeight); pdf.save('Cease-and-Desist-Letter.pdf'); } catch (error) { console.error("Error generating PDF:", error); alert("An error occurred while generating the PDF. Please try again."); } finally { // Restore button state downloadButton.textContent = 'Download PDF'; downloadButton.disabled = false; } } // --- Event Listeners --- tabButtons.forEach(button => { button.addEventListener('click', () => { currentTab = parseInt(button.dataset.tab); updateDisplay(); }); }); nextBtn.addEventListener('click', () => { if (currentTab < totalTabs) { currentTab++; updateDisplay(); } }); prevBtn.addEventListener('click', () => { if (currentTab > 1) { currentTab--; updateDisplay(); } }); if (downloadPdfBtn) { downloadPdfBtn.addEventListener('click', downloadPDF); } // --- Initial State --- updateDisplay(); });
Scroll to Top