A self-contained, entirely client-side tool (fill in details, live
preview, download PDF) - no server-side business logic, so unlike the
other tools there's no logic.py, just a route serving the page.
- Wired into the platform: Blueprint at /payslip/, registered in
main.py, landing-page card added.
- Header logo linked back to / (every other tool's header does this;
the original standalone page didn't).
- SRI-pinned the PDF-generation script tags so a compromised/MITM'd CDN
response can't silently run in a page handling employee/contractor
pay data.
- Earnings/deductions columns padded with blank filler rows so
"Gross earnings" and "Total deductions" always land on the same
line, regardless of how many rows either side has.
- Rewrote PDF generation to call html2canvas + jsPDF directly instead
of through html2pdf.js: its bundled html2canvas mis-rendered (blank
or truncated) shorter payslips, reproducible and confirmed via a
controlled A/B test against the current standalone html2canvas.
Direct usage also fixes page-fit (custom page size, hotfixes for
correct px scaling, orientation/rounding handled explicitly) so the
PDF matches the on-screen preview on a single page.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>