Script Breakdown Tool

Script Breakdown Tool

Analyze your script and tag elements for production.

Project & Script

Script

Tagged Elements

Breakdown Report

Project: ${breakdownData.projectTitle} | Generated: ${new Date().toLocaleDateString("en-US")}

${reportSectionsHtml || '

No elements were tagged in this breakdown.

'}
`; const pdfTemplate = document.getElementById('pdf-template'); pdfTemplate.innerHTML = reportHtml; pdfTemplate.classList.remove('invisible'); try { const { jsPDF } = window.jspdf; const canvas = await html2canvas(pdfTemplate.querySelector('.pdf-report-container'), { 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 pdfHeight = (canvas.height * pdfWidth) / canvas.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save(`${breakdownData.projectTitle.replace(/\s+/g, '_')}_Breakdown.pdf`); } catch(e) { console.error('PDF Generation Error:', e); } finally { button.disabled = false; button.textContent = 'Download Report as PDF'; pdfTemplate.classList.add('invisible'); } }); // --- INITIALIZATION --- switchTab(0); createTaggerButtons(); renderTaggedItems(); });
Scroll to Top