Skip to content

Harden report PDF export and split grown text across pages - #46

Merged
Ziinc merged 1 commit into
mainfrom
ccr-dcc93ffe-bvr4wf-report-polish
Oct 6, 2026
Merged

Ziinc merged 1 commit into
mainfrom
ccr-dcc93ffe-bvr4wf-report-polish

Conversation

@Ziinc

@Ziinc Ziinc commented Oct 6, 2026

Copy link
Copy Markdown
Contributor
  • PNGs in PDF export: Rust rejects a PNG that declares more than 50 megapixels before allocating anything, caps the decoder at 64 MiB, and the export message says which images printed as placeholders and why. 16-bit PNGs no longer pass through with /BitsPerComponent 16, which needs PDF 1.5; Rust strips them to 8 bits. prepare_report_pdf now runs as an async command, off the main thread.
  • Grown text across pages: a band whose text grew now splits between lines across pages instead of running past the footer. A side-by-side sibling stays where it is, and Keep together still moves a band that fits on one page. A required parameter passed as null now prompts, and Can grow is hidden on page header and footer text, where it has no effect.
  • Docs and tests: web/docs/guides/reports.md and docs/decisions/report-engine.md now describe Can grow, the bundled fallback fonts with the exact excluded scripts, PNG support, and the run-time parameter prompt. New Rust tests cover huge, truncated, 16-bit and interlaced PNGs, and new unit tests cover the page split. All 656 unit tests pass, the report and golden snapshot integration tests pass unchanged, and cargo test --lib report_pdf passes 11 of 11.

Generated by Claude Code

- Rust rejects PNGs that declare more than 50 megapixels before allocating,
  caps the decoder at 64 MiB, and reports why an image prints as a
  placeholder; prepare_report_pdf runs as an async command.
- 16-bit PNGs no longer pass through (PDF 1.4 allows 8 bits); Rust strips them.
- Bands with grown text split between lines across pages instead of running
  past the footer; keepTogether still moves a band that fits a page.
- A required parameter passed as null prompts; Can grow is hidden on page
  header and footer text.
- Reports guide and decision record describe Can grow, the fallback fonts and
  the exact excluded scripts, PNG support and the parameter prompt.
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

@Ziinc
Ziinc merged commit 127a088 into main Oct 6, 2026
16 checks passed

This branch was successfully deployed

1 active deployment
preview — 2152b5db Deployed Oct 6, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants