Skip to content

v0.10.5

Choose a tag to compare

@danmolitor danmolitor released this 03 Jul 15:19
· 150 commits to main since this release

Forme 0.10.5

Patch release. Fixes two table page-break regressions reported on GitHub. Zero breaking changes — safe drop-in from 0.10.4.


What's fixed

1. Orphan header at the bottom of a page

When a <Table> with <Row header> sat low enough on a page that the header alone fit in the remaining space but the first body row did not, the header rendered at the bottom of the page with nothing beneath it, then repeated above the actual rows on the next page.

Before:

Page 1: [ …content… ]  [Header]                ← orphaned
Page 2: [Header]  [Row 1]  [Row 2]  …

After:

Page 1: [ …content… ]
Page 2: [Header]  [Row 1]  [Row 2]  …

Closes GitHub issue reported against 0.10.4.

2. Long-token header text contamination

When a header cell contained a long token with no line-break opportunities (e.g. "Amount".repeat(40)), it wrapped to many lines, and the table starting low on a page could leak header text onto the previous page while the actual table rendered across three pages instead of two.

Same fix — the table now moves cleanly to a fresh page where the tall header has full page height to wrap into. No cross-page contamination, correct page count.


What changed under the hood

The 0.10.4 pre-fit check in layout_table gated only on total_header_h > remaining_height. It now also folds in the first body row's measured height:

let needed = total_header_h + first_body_h;
if needed > cursor.remaining_height() && needed <= fresh_page_available {
    // page-break the table before the header, not after it
}

The fresh-page cap keeps the 0.10.4 !is_header cell-overflow guard as the safety net for the rare case where header + first row is genuinely taller than a page.

Two new integration tests — both verified to fail without the fix and pass with it:

  • test_table_header_no_orphan_when_first_body_row_doesnt_fit
  • test_table_long_header_text_no_page_contamination

Which packages carry the fix

The fix lives in the Rust engine, so every consumer of engine 0.10.5 picks it up automatically:

  • npm: @formepdf/react, @formepdf/core, @formepdf/renderer, @formepdf/cli, @formepdf/hono, @formepdf/next, @formepdf/mcp, @formepdf/resend, @formepdf/sdk, @formepdf/tailwind, @formepdf/templates — all 0.10.5
  • PyPI: formepdf0.10.5
  • crates.io: forme-pdf0.10.5
  • Go: github.com/formepdf/forme-gov0.10.5
  • Docker Hub: formepdf/rasterizer:0.10.5, formepdf/forme:0.10.5
  • VS Code Marketplace: forme-pdf0.10.5

Upgrade

# npm — bump both simultaneously; @formepdf/core carries the WASM
npm install @formepdf/react@0.10.5 @formepdf/core@0.10.5

# Python
pip install --upgrade formepdf==0.10.5

# Rust
cargo update -p forme-pdf

# Go
go get github.com/formepdf/forme-go@v0.10.5

# Docker (self-hosted)
docker pull formepdf/forme:0.10.5

Full changelogs