Electronic Witness Verification Tool

Electronic Witness Verification Tool

Follow the steps to document the verification of a witness.

This document certifies that on the verification date indicated above, the facilitator of this process completed the checklist affirming that the witness was properly identified and met the necessary criteria to act as a witness for the specified document and signer. This certificate is a record of the procedural steps taken and does not constitute legal advice.

`; certificateOutput.innerHTML = certHTML; }; // --- EVENT LISTENERS --- tabs.forEach((tab, index) => { if (tab.btn) tab.btn.addEventListener('click', () => { // Prevent jumping to tabs if validation on tab 3 is not complete if (index > 2 && !checkVerificationTab()) return; currentTab = index; updateTabUI(); }); }); nextBtn.addEventListener('click', () => { if (currentTab < tabs.length - 1) { currentTab++; updateTabUI(); } }); prevBtn.addEventListener('click', () => { if (currentTab > 0) { currentTab--; updateTabUI(); } }); // Add event listeners to checkboxes on verification tab to enable/disable next button if (tabs[2].content) { tabs[2].content.querySelectorAll('input[type="checkbox"]').forEach(checkbox => { checkbox.addEventListener('change', updateTabUI); }); } downloadPdfBtn.addEventListener('click', () => { const { jsPDF } = window.jspdf; const pdfExportContainer = document.getElementById('pdfExportContainer'); // Use the already generated certificate HTML pdfExportContainer.innerHTML = `
${certificateOutput.innerHTML}
`; html2canvas(pdfExportContainer, { scale: 2, useCORS: true }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const canvasWidth = canvas.width; const canvasHeight = canvas.height; const ratio = canvasWidth / canvasHeight; const imgWidth = pdfWidth - 20; // with margin const imgHeight = imgWidth / ratio; let finalImgHeight = imgHeight > (pdfHeight - 20) ? (pdfHeight - 20) : imgHeight; pdf.addImage(imgData, 'PNG', 10, 10, imgWidth, finalImgHeight); pdf.save('witness_verification_certificate.pdf'); pdfExportContainer.innerHTML = ''; // Clean up }); }); // --- INITIALIZE APP --- document.getElementById('signingDate').valueAsDate = new Date(); updateTabUI(); });
Scroll to Top