Harassment Complaint Form Generator

Harassment Complaint Form Generator

Generate a formal complaint document by filling out the fields below.

Complainant & Respondent Information

Your Information (Complainant)
Accused Party's Information (Respondent)

Incident Details

Supporting Evidence & Desired Outcome

Review & Download Complaint Form

Your generated complaint form will appear here after you proceed to this step.

Complainant Contact: ${complaintData.complainantContact}

Respondent Name: ${complaintData.respondentName}

Respondent Position/Title: ${complaintData.respondentPosition}

II. Details of the Incident

Date of Incident: ${complaintData.incidentDate}

Location: ${complaintData.incidentLocation}

Witness(es), if any: ${complaintData.witnesses}

III. Statement of Complaint

${complaintData.incidentDescription.replace(/\n/g, '
')}

IV. Supporting Evidence

${complaintData.evidence.replace(/\n/g, '
')}

V. Desired Resolution

${complaintData.desiredOutcome.replace(/\n/g, '
')}

VI. Signature

Signature of ${complaintData.complainantName}

`; document.getElementById('complaintPreview').innerHTML = previewHTML; // Also populate the hidden div for better PDF rendering document.getElementById('pdf-render-area').innerHTML = previewHTML; } /** * Downloads the generated complaint as a PDF file. */ async function downloadPDF() { const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('pdf-render-area'); if (!pdfContent) { console.error('PDF content area not found.'); return; } // Temporarily make the render area visible for html2canvas pdfContent.classList.remove('hidden'); try { const canvas = await html2canvas(pdfContent, { scale: 2 // Increase scale for better resolution }); 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('Harassment_Complaint_Form.pdf'); } catch (error) { console.error('Error generating PDF:', error); } finally { // Hide the render area again pdfContent.classList.add('hidden'); } } // --- EVENT LISTENERS --- if (downloadPdfBtn) { downloadPdfBtn.addEventListener('click', downloadPDF); } // --- INITIALIZATION --- showTab(currentTab); });
Scroll to Top