Corporate Legal Budget Planning Tool

Corporate Legal Budget Planning Tool

Plan, track, and manage your legal department's annual budget.

Total Budgeted

$0.00

Total Actual Spend

$0.00

Remaining Budget

$0.00

Budget vs. Actual Spend by Category

Step 1 of 3

No chart data available.

'}

Detailed Breakdown

${tableHtml} `; } async function generatePdf() { const { jsPDF } = window.jspdf; const reportContent = document.getElementById('pdf-content'); try { const canvas = await html2canvas(reportContent, { scale: 2 }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'portrait', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const margin = 40; pdf.setFontSize(22); pdf.text("Corporate Legal Budget Report", margin, margin + 10); pdf.setFontSize(12); pdf.text(`Report generated on: ${new Date().toLocaleDateString()}`, margin, margin + 30); const imgProps = pdf.getImageProperties(imgData); const imgWidth = pdfWidth - (2 * margin); const imgHeight = (imgProps.height * imgWidth) / imgProps.width; let heightLeft = imgHeight; let position = margin + 50; pdf.addImage(imgData, 'PNG', margin, position, imgWidth, imgHeight); heightLeft -= (pdfHeight - position - margin); while (heightLeft > 0) { position = heightLeft - imgHeight - margin; pdf.addPage(); pdf.addImage(imgData, 'PNG', margin, position, imgWidth, imgHeight); heightLeft -= pdfHeight; } pdf.save('Corporate_Legal_Budget_Report.pdf'); } catch (error) { console.error('Error generating PDF:', error); alert('An error occurred while generating the PDF.'); } } // --- START THE APP --- initializeTool(); });
Scroll to Top