Back
Prospectus Creator

Prospectus Creator Tool

Institution Information

Drag & drop or click to upload logo

Academic Programs

Separate programs with blank lines

Gallery Images (optional)

Upload multiple images for gallery

Staff Members (optional)

Contact Information

PDF Page Setup

Live Preview

Your prospectus preview will appear here.

Fill out the form and click “Update Preview” to see changes.

`; } } // Programs const programs = document.getElementById('programs').value; if (programs) { html += `

Academic Programs

`; html += `
    ${programs.split('\n\n').map(program => program ? `
  • ${program.replace(/\n/g, '
    ')}
  • ` : '' ).join('')}
`; } // Facilities const facilities = document.getElementById('facilities').value; if (facilities) { html += `

Our Facilities

`; html += `

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

`; } // Achievements const achievements = document.getElementById('achievements').value; if (achievements) { html += `

Achievements

`; html += `

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

`; } // Staff const staffMembers = document.querySelectorAll('.staff-member'); if (staffMembers.length > 0) { let hasStaffData = false; staffMembers.forEach(member => { if (member.querySelector('.staff-name').value || member.querySelector('.staff-photo').files[0]) { hasStaffData = true; } }); if (hasStaffData) { html += `

Our Staff

`; html += `
`; staffMembers.forEach(member => { const name = member.querySelector('.staff-name').value; const position = member.querySelector('.staff-position').value; const qualification = member.querySelector('.staff-qualification').value; const statement = member.querySelector('.staff-statement').value; const photoFile = member.querySelector('.staff-photo').files[0]; if (name || photoFile) { html += `
`; if (photoFile) { const photoUrl = URL.createObjectURL(photoFile); html += `${name || 'Staff'}`; } if (name) html += `

${name}

`; if (position) html += `

${position}

`; if (qualification) html += `

${qualification}

`; if (statement) html += `

${statement}

`; html += `
`; } }); html += `
`; } } // Gallery const galleryFiles = document.getElementById('galleryImages').files; if (galleryFiles.length > 0) { html += `

Gallery

`; html += `
`; for (let i = 0; i < Math.min(galleryFiles.length, 6); i++) { const imgUrl = URL.createObjectURL(galleryFiles[i]); html += ``; } if (galleryFiles.length > 6) { html += `
+${galleryFiles.length - 6} more
`; } html += `
`; } // Contact const address = document.getElementById('address').value; const phone = document.getElementById('phone').value; const email = document.getElementById('email').value; const website = document.getElementById('website').value; if (address || phone || email || website) { html += `

Contact Us

`; html += `
`; if (address) html += `

Address: ${address.replace(/\n/g, '
')}

`; if (phone) html += `

Phone: ${phone}

`; if (email) html += `

Email: ${email}

`; if (website) html += `

Website: ${website}

`; html += `
`; } previewContent.innerHTML = html; showPdfOptionsBtn.style.display = 'block'; pageSetupOptions.style.display = 'none'; } // Generate PDF function function generatePdf() { const pageSize = document.getElementById('pageSize').value; const orientation = document.getElementById('pageOrientation').value; const margins = parseInt(document.getElementById('pageMargins').value) || 20; // Create PDF const doc = new jsPDF({ orientation: orientation, unit: 'mm', format: pageSize }); // Set margins const pageWidth = doc.internal.pageSize.getWidth(); const pageHeight = doc.internal.pageSize.getHeight(); const contentWidth = pageWidth - margins * 2; // Add content from preview const previewContent = document.getElementById('previewContent').cloneNode(true); // Remove images for PDF (we'll add them separately) const images = previewContent.querySelectorAll('img'); images.forEach(img => { const placeholder = document.createElement('div'); placeholder.style.height = img.height + 'px'; placeholder.style.border = '1px dashed #ccc'; placeholder.style.display = 'flex'; placeholder.style.alignItems = 'center'; placeholder.style.justifyContent = 'center'; placeholder.textContent = '[Image: ' + (img.alt || '') + ']'; img.parentNode.replaceChild(placeholder, img); }); // Convert HTML to PDF doc.html(previewContent, { x: margins, y: margins, width: contentWidth, windowWidth: previewContent.scrollWidth, callback: function(doc) { // Save the PDF doc.save('prospectus.pdf'); } }); }