Attorney-Client Privilege Management Tool

Attorney-Client Privilege Management Tool

Log and assess communications to manage and protect attorney-client privilege.

Communication Dashboard

Communication Date Privilege Likelihood Actions

Assess a New Communication

Privilege Assessment Questions

Generated on: ${new Date().toLocaleDateString('en-US')}

`; communications.forEach(comm => { const likelihood = getPrivilegeLikelihood(comm); logHtml += ` `; }); logHtml += `
Communication Date Privilege Likelihood
${comm.subject} ${new Date(comm.date).toLocaleDateString('en-US', { timeZone: 'UTC' })} ${likelihood.text}
`; if (communications.length === 0) { logHtml += `

No communications were logged.

`; } pdfPreview.innerHTML = logHtml; downloadPdfBtn.textContent = 'Generating...'; downloadPdfBtn.disabled = true; container.classList.remove('hidden'); container.style.position = 'absolute'; container.style.left = '-9999px'; container.style.top = '0'; try { const canvas = await html2canvas(pdfPreview, { scale: 2 }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const margin = 40; const usableWidth = pdfWidth - margin * 2; const imgHeight = (canvas.height * usableWidth) / canvas.width; const pageHeight = pdf.internal.pageSize.getHeight() - (margin * 2); let heightLeft = imgHeight; let position = margin; pdf.addImage(imgData, 'PNG', margin, position, usableWidth, imgHeight); heightLeft -= pageHeight; while (heightLeft > 0) { position = heightLeft - imgHeight + margin; pdf.addPage(); pdf.addImage(imgData, 'PNG', margin, position, usableWidth, imgHeight); heightLeft -= pageHeight; } pdf.save('Attorney_Client_Privilege_Log.pdf'); } catch (error) { console.error("Error generating PDF:", error); } finally { container.classList.add('hidden'); container.style.position = ''; downloadPdfBtn.textContent = 'Download Log as PDF'; downloadPdfBtn.disabled = false; pdfPreview.innerHTML = ''; } } downloadPdfBtn.addEventListener('click', downloadPDF); // --- Initial Load --- renderLogTable(); updateNavButtons(); });
Scroll to Top