Litigation Timeline Generator

Litigation Timeline Generator

Create and visualize a timeline of key litigation events.

Case Information

Data Configuration: Key Dates & Events

Generated Litigation Timeline

Your timeline will appear here once you've entered key dates.

Disclaimer: This tool is for informational purposes only and does not constitute legal advice. Deadlines can vary significantly based on jurisdiction and case-specific orders. Always consult the official court schedule.

${formattedDate}

${event.desc}

`; }); timelineHTML += '
'; timelinePreview.innerHTML = timelineHTML; preparePdfContent(events); } /** * Prepares the timeline content for PDF generation. */ function preparePdfContent(events) { const plaintiff = document.getElementById('plaintiff').value || 'N/A'; const defendant = document.getElementById('defendant').value || 'N/A'; const court = document.getElementById('court').value || 'N/A'; const caseNumber = document.getElementById('caseNumber').value || 'N/A'; let tableHTML = `

Litigation Timeline

Case Information

Case: ${plaintiff} v. ${defendant}

Court: ${court}

Case Number: ${caseNumber}

Key Events

`; events.forEach(event => { const formattedDate = new Date(event.date + 'T00:00:00').toLocaleDateString('en-US'); tableHTML += ``; }); tableHTML += '
DateEvent
${formattedDate}${event.desc}
'; document.getElementById('pdf-content-wrapper').innerHTML = tableHTML; } /** * Downloads the generated report as a PDF file. */ async function downloadPDF() { const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('pdf-render-area'); if (!pdfContent) return; downloadPdfBtn.textContent = 'Generating...'; downloadPdfBtn.disabled = true; pdfContent.classList.remove('hidden'); try { const canvas = await html2canvas(pdfContent, { scale: 2 }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'portrait', unit: 'in', format: 'letter' }); const imgProps = pdf.getImageProperties(imgData); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save('Litigation_Timeline.pdf'); } catch (error) { console.error('Error generating PDF:', error); } finally { pdfContent.classList.add('hidden'); downloadPdfBtn.textContent = 'Download Timeline as PDF'; downloadPdfBtn.disabled = false; } } // --- EVENT LISTENERS --- document.getElementById('addEventBtn').addEventListener('click', () => addEventRow("", true)); downloadPdfBtn.addEventListener('click', downloadPDF); // --- INITIALIZATION --- populateStandardEvents(); showTab(currentTab); });
Scroll to Top