Project Scope Document Generator

Project Scope Document Generator

Project Scope Document Generator

Generated Project Scope Document

Step 2: Project Details

Define the fundamental aspects of your project.

Step 3: Scope Definition

Clearly define what is included and excluded from the project.

Step 4: Constraints & Assumptions

Identify limitations, risks, and underlying assumptions.

Step 5: Review and Generate

Review the information you've entered in the previous tabs. When ready, click the button below to generate the Project Scope Document.

${projDesc}

2. Project Goals & Objectives

${projGoals}

3. Key Stakeholders

${projStakeholders}

4. Scope Definition

4.1 In Scope

${scopeIn}

4.2 Out of Scope

${scopeOut}

5. Project Deliverables

${deliverables}

6. Constraints

${constraints}

7. Assumptions

${assumptions}

8. Potential Risks

${risks} `; // 3. Enable PDF button & switch to Dashboard pdfBtn.disabled = false; pdfBtn.classList.remove('disabled:opacity-50', 'disabled:cursor-not-allowed'); showTab(0); // Switch to the first tab (Dashboard) }); // --- PDF Download Logic --- pdfBtn.addEventListener('click', function() { if (this.disabled) return; const { jsPDF } = window.jspdf; const contentToCapture = document.getElementById('psdg-scope-content-wrapper'); const originalBtnText = pdfBtn.textContent; pdfBtn.textContent = 'Generating...'; pdfBtn.disabled = true; // Add a title specifically for PDF rendering inside the captured area const pdfTitle = document.createElement('h2'); pdfTitle.className = "text-center text-2xl font-bold text-gray-800 mb-6"; pdfTitle.textContent = "Project Scope Document"; contentToCapture.prepend(pdfTitle); // Add before existing content html2canvas(contentToCapture, { scale: 2, backgroundColor: "#ffffff", // Use wrapper background onclone: (doc) => { doc.getElementById('psdg-scope-content-wrapper').style.display = 'block'; } }).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 margin = 15; // mm const imgProps = pdf.getImageProperties(imgData); const imgWidth = pdfWidth - (margin * 2); const imgHeight = (imgProps.height * imgWidth) / imgProps.width; let heightLeft = imgHeight; let position = margin; pdf.addImage(imgData, 'PNG', margin, position, imgWidth, imgHeight); heightLeft -= (pdfHeight - (margin * 2)); // Subtract first page height while (heightLeft > 0) { position = heightLeft - imgHeight + margin; // Calculate new top position for image slice pdf.addPage(); pdf.addImage(imgData, 'PNG', margin, position, imgWidth, imgHeight); heightLeft -= (pdfHeight - (margin * 2)); // Subtract page height } pdf.save('project_scope_document.pdf'); contentToCapture.removeChild(pdfTitle); // Clean up added title pdfBtn.textContent = originalBtnText; // Keep PDF button enabled after generation // pdfBtn.disabled = false; }).catch(err => { console.error("PDF generation failed:", err); contentToCapture.removeChild(pdfTitle); // Clean up title on error pdfBtn.textContent = originalBtnText; // pdfBtn.disabled = false; }); }); // --- Initial Setup --- pdfBtn.disabled = true; // Disable PDF initially showTab(0); updateNavButtons(); // Call initially to set button states });
Scroll to Top