Termination Letter Generator

Termination Letter Generator

Draft professional, legally-standard employment termination documents.

Recent Drafts

Manage your draft letters here. Note: Data is stored locally in your browser.

Employee Name Termination Date Type Action
Company & Employee Info
Termination Details
Logistics & Benefits
* Review carefully before exporting.

Company Property
Please return ${items} and any other company property in your possession immediately.

${sevText}

If you have questions regarding your final pay or benefits, please contact the Human Resources department.

We wish you the best in your future endeavors.


Sincerely,


__________________________
${mgrName}
${compName}

`; document.getElementById('tlg-letter-content').innerHTML = letterHTML; // Save to drafts internally drafts.unshift({ id: Date.now(), name: empName, date: termDateRaw, type: reasonCat === 'without_cause' ? "Layoff" : (reasonCat === 'for_cause' ? "For Cause" : "At-Will") }); tlgRenderHistory(); tlgSwitchTab('preview'); }; window.tlgClearForm = function() { if(confirm("Clear all input fields?")) { document.getElementById('tlg-emp-name').value = ""; document.getElementById('tlg-emp-title').value = ""; document.getElementById('tlg-comp-name').value = ""; document.getElementById('tlg-mgr-name').value = ""; document.getElementById('tlg-items').value = ""; } }; window.tlgDeleteDraft = function(id) { drafts = drafts.filter(d => d.id !== id); tlgRenderHistory(); }; function tlgRenderHistory() { const tbody = document.getElementById('tlg-history-body'); tbody.innerHTML = ''; if(drafts.length === 0) { tbody.innerHTML = 'No recent drafts.'; return; } drafts.forEach(d => { const tr = document.createElement('tr'); tr.innerHTML = ` ${escapeHtml(d.name)} ${d.date} ${d.type} `; tbody.appendChild(tr); }); } function escapeHtml(text) { if (!text) return ''; return text.replace(/[&<>"']/g, function(m) { switch (m) { case '&': return '&'; case '<': return '<'; case '>': return '>'; case '"': return '"'; case "'": return '''; default: return m; } }); } // --- PDF Generation --- window.tlgDownloadPDF = function() { const element = document.getElementById('tlg-print-area'); const empName = document.getElementById('tlg-emp-name').value || "Employee"; // Add class for print styling document.body.classList.add('tlg-generating-pdf'); const opt = { margin: [0.75, 0.75], filename: `Termination_Letter_${empName.replace(/\s+/g, '_')}.pdf`, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, useCORS: true }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' }, pagebreak: { mode: ['avoid-all', 'css', 'legacy'] } }; html2pdf().set(opt).from(element).save().then(() => { document.body.classList.remove('tlg-generating-pdf'); }); }; });
Scroll to Top