3 Commits
Author SHA1 Message Date
admin 3fd8dfe294 fix(pdf): sanitise non-WinAnsi chars, handle newlines in wrap 2026-07-28 17:53:04 +08:00
adminandClaude Sonnet 4.6 e7d82f3a5a fix(pdf): skip section gap on new page, reserve space for CAPA label
- Fix 1: drawSection now checks if ensureSpace triggered a page break by
  comparing state.y before/after. Only subtract SECTION_GAP if we're not
  at the top of a fresh page, avoiding wasting 20px after page breaks.

- Fix 2: CAPA loop now reserves LINE_HEIGHT * 4 instead of just LINE_HEIGHT
  to keep the label and at least a few fields together on the same page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEYxFQiCyxJvnBCoZeYzB9
2026-07-28 16:56:13 +08:00
admin 8bbdd4f843 feat(pdf): add incident report PDF builder 2026-07-28 16:52:31 +08:00